summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-15 15:05:55 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-15 15:05:55 -0400
commit30fc9f2e1e8f5e59fa98d9e9df6263da88b9eaed (patch)
tree0c2c0d40e9e893d7a28f3dfcc7d5ebc3e81185a3 /src/lib/Bcfg2
parentde4940d9f39c51d68623eba9c99cc0a56deb9428 (diff)
downloadbcfg2-30fc9f2e1e8f5e59fa98d9e9df6263da88b9eaed.tar.gz
bcfg2-30fc9f2e1e8f5e59fa98d9e9df6263da88b9eaed.tar.bz2
bcfg2-30fc9f2e1e8f5e59fa98d9e9df6263da88b9eaed.zip
removed print statements
Diffstat (limited to 'src/lib/Bcfg2')
-rwxr-xr-xsrc/lib/Bcfg2/Client/Tools/rpmtools.py23
-rw-r--r--src/lib/Bcfg2/Options.py5
-rw-r--r--src/lib/Bcfg2/Server/Admin/Bundle.py1
-rw-r--r--src/lib/Bcfg2/Server/Admin/Pull.py1
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/backends.py5
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/ldapauth.py1
-rwxr-xr-xsrc/lib/Bcfg2/Server/Reports/importscript.py2
7 files changed, 4 insertions, 34 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/rpmtools.py b/src/lib/Bcfg2/Client/Tools/rpmtools.py
index 7441b2c06..32a04262d 100755
--- a/src/lib/Bcfg2/Client/Tools/rpmtools.py
+++ b/src/lib/Bcfg2/Client/Tools/rpmtools.py
@@ -43,7 +43,6 @@ try:
isprelink_imported = True
except ImportError:
isprelink_imported = False
- #print '*********************** isprelink not loaded ***********************'
# If the prelink command is installed on the system then we need to do
# prelink -y on files.
@@ -333,7 +332,6 @@ def prelink_size_check(filename):
fsize += len(data)
elif whitelist_re.search(filename) and not blacklist_re.search(filename):
- # print "***** Warning isprelink extension failed to import ******"
plf.close()
cmd = '/usr/sbin/prelink -y %s 2> /dev/null' \
% (re.escape(filename))
@@ -601,7 +599,6 @@ def rpm_verify_package(vp_ts, header, verify_options):
omitmask |= VERIFY_RDEV
omitmask = ((~omitmask & VERIFY_ATTRS) ^ VERIFY_ATTRS)
- #print 'omitmask =', omitmask
package_results = {}
@@ -754,58 +751,41 @@ class Rpmtscallback(object):
"""
if reason == rpm.RPMCALLBACK_INST_OPEN_FILE:
pass
- #print 'rpm.RPMCALLBACK_INST_OPEN_FILE'
elif reason == rpm.RPMCALLBACK_INST_CLOSE_FILE:
pass
- #print 'rpm.RPMCALLBACK_INST_CLOSE_FILE'
elif reason == rpm.RPMCALLBACK_INST_START:
pass
- #print 'rpm.RPMCALLBACK_INST_START'
elif reason == rpm.RPMCALLBACK_TRANS_PROGRESS or \
reason == rpm.RPMCALLBACK_INST_PROGRESS:
pass
- #print 'rpm.RPMCALLBACK_TRANS_PROGRESS or \
# rpm.RPMCALLBACK_INST_PROGRESS'
elif reason == rpm.RPMCALLBACK_TRANS_START:
pass
- #print 'rpm.RPMCALLBACK_TRANS_START'
elif reason == rpm.RPMCALLBACK_TRANS_STOP:
pass
- #print 'rpm.RPMCALLBACK_TRANS_STOP'
elif reason == rpm.RPMCALLBACK_REPACKAGE_START:
pass
- #print 'rpm.RPMCALLBACK_REPACKAGE_START'
elif reason == rpm.RPMCALLBACK_REPACKAGE_PROGRESS:
pass
- #print 'rpm.RPMCALLBACK_REPACKAGE_PROGRESS'
elif reason == rpm.RPMCALLBACK_REPACKAGE_STOP:
pass
- #print 'rpm.RPMCALLBACK_REPACKAGE_STOP'
elif reason == rpm.RPMCALLBACK_UNINST_PROGRESS:
pass
- #print 'rpm.RPMCALLBACK_UNINST_PROGRESS'
elif reason == rpm.RPMCALLBACK_UNINST_START:
pass
- #print 'rpm.RPMCALLBACK_UNINST_START'
elif reason == rpm.RPMCALLBACK_UNINST_STOP:
pass
- #print 'rpm.RPMCALLBACK_UNINST_STOP'
- #print '***Package ', key, ' deleted ***'
# How do we get at this?
# RPM.modified += key
elif reason == rpm.RPMCALLBACK_UNPACK_ERROR:
pass
- #print 'rpm.RPMCALLBACK_UNPACK_ERROR'
elif reason == rpm.RPMCALLBACK_CPIO_ERROR:
pass
- #print 'rpm.RPMCALLBACK_CPIO_ERROR'
elif reason == rpm.RPMCALLBACK_UNKNOWN:
pass
- #print 'rpm.RPMCALLBACK_UNKNOWN'
else:
print('ERROR - Fell through callBack')
- #print reason, amount, total, key, client_data
def rpm_erase(erase_pkgspecs, erase_flags):
"""
@@ -836,7 +816,6 @@ def rpm_erase(erase_pkgspecs, erase_flags):
erase_ts.addErase(idx)
#for te in erase_ts:
- # print "%s %s:%s-%s.%s" % (te.N(), te.E(), te.V(), te.R(), te.A())
erase_problems = []
if 'nodeps' not in erase_flags:
@@ -847,8 +826,6 @@ def rpm_erase(erase_pkgspecs, erase_flags):
erase_callback = Rpmtscallback()
erase_ts.run(erase_callback.callback, 'Erase')
#else:
- # print 'ERROR - Dependency failures on package erase'
- # print erase_problems
erase_ts.closeDB()
del erase_ts
diff --git a/src/lib/Bcfg2/Options.py b/src/lib/Bcfg2/Options.py
index 2ca465a4f..edebd10b3 100644
--- a/src/lib/Bcfg2/Options.py
+++ b/src/lib/Bcfg2/Options.py
@@ -140,8 +140,9 @@ class Option(object):
if self.deprecated_cf:
try:
self.value = self.get_cooked_value(configparser.get(*self.deprecated_cf))
- print "Warning: [%s] %s is deprecated, use [%s] %s instead" % \
- (self.deprecated_cf[0], self.deprecated_cf[1], self.cf[0], self.cf[1])
+ print("Warning: [%s] %s is deprecated, use [%s] %s instead"
+ % (self.deprecated_cf[0], self.deprecated_cf[1],
+ self.cf[0], self.cf[1]))
return
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
pass
diff --git a/src/lib/Bcfg2/Server/Admin/Bundle.py b/src/lib/Bcfg2/Server/Admin/Bundle.py
index ab07e29b3..49e530b15 100644
--- a/src/lib/Bcfg2/Server/Admin/Bundle.py
+++ b/src/lib/Bcfg2/Server/Admin/Bundle.py
@@ -50,7 +50,6 @@ class Bundle(Bcfg2.Server.Admin.MetadataCore):
bundle_name = []
bundle_list = xml_list + genshi_list
for bundle_path in bundle_list:
- print "matching %s" % bundle_path
bundle_name.append(rg.search(bundle_path).group(1))
text = "Available bundles (Number of bundles: %s)" % \
(len(bundle_list))
diff --git a/src/lib/Bcfg2/Server/Admin/Pull.py b/src/lib/Bcfg2/Server/Admin/Pull.py
index 70984c57d..64327e018 100644
--- a/src/lib/Bcfg2/Server/Admin/Pull.py
+++ b/src/lib/Bcfg2/Server/Admin/Pull.py
@@ -93,7 +93,6 @@ class Pull(Bcfg2.Server.Admin.MetadataCore):
for k, v in list(data.items()):
if v:
new_entry[k] = v
- #print new_entry
return new_entry
def Choose(self, choices):
diff --git a/src/lib/Bcfg2/Server/Hostbase/backends.py b/src/lib/Bcfg2/Server/Hostbase/backends.py
index ecaf3c109..cfa9e1e16 100644
--- a/src/lib/Bcfg2/Server/Hostbase/backends.py
+++ b/src/lib/Bcfg2/Server/Hostbase/backends.py
@@ -18,21 +18,16 @@ from nisauth import *
## uid=l.badge_no
## )
## #fixme: need to add this user session obj to session
-## #print str(ldap_user)
## user,created = User.objects.get_or_create(username=username)
-## #print user
-## #print "created " + str(created)
## return user
## except LDAPAUTHError,e:
-## #print str(e)
## return None
## def get_user(self,user_id):
## try:
## return User.objects.get(pk=user_id)
## except User.DoesNotExist, e:
-## print str(e)
## return None
diff --git a/src/lib/Bcfg2/Server/Hostbase/ldapauth.py b/src/lib/Bcfg2/Server/Hostbase/ldapauth.py
index f3db26f67..fc2ca1bf1 100644
--- a/src/lib/Bcfg2/Server/Hostbase/ldapauth.py
+++ b/src/lib/Bcfg2/Server/Hostbase/ldapauth.py
@@ -144,7 +144,6 @@ class ldapauth(object):
def member_of(self):
"""See if this user is in our group that is allowed to login"""
m = [g for g in self.memberOf if g == self.check_member_of]
- #print m
if len(m) == 1:
return True
else:
diff --git a/src/lib/Bcfg2/Server/Reports/importscript.py b/src/lib/Bcfg2/Server/Reports/importscript.py
index 289970244..3cc643da1 100755
--- a/src/lib/Bcfg2/Server/Reports/importscript.py
+++ b/src/lib/Bcfg2/Server/Reports/importscript.py
@@ -286,7 +286,7 @@ if __name__ == '__main__':
if o in ("-d", "--debug"):
verb = 3
if o in ("-c", "--clients"):
- print "DeprecationWarning: %s is no longer used" % o
+ print("DeprecationWarning: %s is no longer used" % o)
if o in ("-s", "--stats"):
statpath = a