diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-20 11:47:45 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-20 11:47:45 +0000 |
commit | 199228d412c83e00f0c4af7ba34f166a891b4e87 (patch) | |
tree | 8aba71db4ea0e3b6539eccaf1dc0fd9e3920fca1 /bin | |
parent | cf4c50ffa68ce110c40ae3926d60b241bbe230c2 (diff) | |
download | portage-199228d412c83e00f0c4af7ba34f166a891b4e87.tar.gz portage-199228d412c83e00f0c4af7ba34f166a891b4e87.tar.bz2 portage-199228d412c83e00f0c4af7ba34f166a891b4e87.zip |
Update syntax of numbers for compatibility with Python 3.
(2to3-3.1 -f numliterals -nw ${FILES})
svn path=/main/trunk/; revision=14292
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/archive-conf | 2 | ||||
-rwxr-xr-x | bin/dispatch-conf | 4 | ||||
-rwxr-xr-x | bin/emaint | 2 | ||||
-rwxr-xr-x | bin/repoman | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/bin/archive-conf b/bin/archive-conf index 8a028f9b0..96c2ea1a8 100755 --- a/bin/archive-conf +++ b/bin/archive-conf @@ -42,7 +42,7 @@ except ImportError: f = open(filename, 'rb') blocksize=32768 data = f.read(blocksize) - size = 0L + size = 0 sum = md5.new() while data: sum.update(data) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index f2228d37c..38359c5b3 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -37,7 +37,7 @@ DIFF_CVS_INTERP = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '# .Hea DIFF_WSCOMMENTS = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '^[-+]#' | grep -v '^[-+][:space:]*$'" # We need a secure scratch dir and python does silly verbose errors on the use of tempnam -oldmask = os.umask(0077) +oldmask = os.umask(0o077) SCRATCH_DIR = None while SCRATCH_DIR is None: try: @@ -81,7 +81,7 @@ class dispatch: if os.path.isfile(self.options["log-file"]) \ or not os.path.exists(self.options["log-file"]): open(self.options["log-file"], 'w').close() # Truncate it - os.chmod(self.options["log-file"], 0600) + os.chmod(self.options["log-file"], 0o600) else: self.options["log-file"] = "/dev/null" diff --git a/bin/emaint b/bin/emaint index 56a6617b0..52ed1f53b 100755 --- a/bin/emaint +++ b/bin/emaint @@ -464,7 +464,7 @@ def emaint_main(myargv): # Similar to emerge, emaint needs a default umask so that created # files (such as the world file) have sane permissions. - os.umask(022) + os.umask(0o22) # TODO: Create a system that allows external modules to be added without # the need for hard coding. diff --git a/bin/repoman b/bin/repoman index 2f0068ccd..c849a22f7 100755 --- a/bin/repoman +++ b/bin/repoman @@ -82,7 +82,7 @@ disallowed_filename_chars_re = re.compile(r'[^a-zA-Z0-9._\-+:]') bad = create_color_func("BAD") # A sane umask is needed for files that portage creates. -os.umask(022) +os.umask(0o22) repoman_settings = portage.config(local_config=False, config_incrementals=portage.const.INCREMENTALS) repoman_settings.lock() @@ -940,7 +940,7 @@ for x in scanlist: pkgs = {} for y in checkdirlist: if y in no_exec and \ - stat.S_IMODE(os.stat(os.path.join(checkdir, y)).st_mode) & 0111: + stat.S_IMODE(os.stat(os.path.join(checkdir, y)).st_mode) & 0o111: stats["file.executable"] += 1 fails["file.executable"].append(os.path.join(checkdir, y)) if y.endswith(".ebuild"): @@ -1219,7 +1219,7 @@ for x in scanlist: stats['changelog.ebuildadded'] += 1 fails['changelog.ebuildadded'].append(relative_path) - if stat.S_IMODE(os.stat(full_path).st_mode) & 0111: + if stat.S_IMODE(os.stat(full_path).st_mode) & 0o111: stats["file.executable"] += 1 fails["file.executable"].append(x+"/"+y+".ebuild") if vcs in ("cvs", "svn") and check_ebuild_notadded and y not in eadded: |