From 55bc31aa3ea4a614ae30ac1a6deb8c96590612ca Mon Sep 17 00:00:00 2001 From: Alexandre Rossi Date: Mon, 28 Jan 2013 08:31:35 +0100 Subject: restore python3 compatibility --- dotfiles/core.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dotfiles/core.py b/dotfiles/core.py index 93e45f1..00d0be1 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -83,9 +83,9 @@ else: else: stat = CreateSymbolicLinkA(name, target, is_dir) if win32_verbose: - print "CreateSymbolicLink(name=%s, target=%s, is_dir=%d) = %#x"%(name,target,is_dir, stat) + print("CreateSymbolicLink(name=%s, target=%s, is_dir=%d) = %#x"%(name,target,is_dir, stat)) if not stat: - print "Can't create symlink %s -> %s"%(name, target) + print("Can't create symlink %s -> %s"%(name, target)) raise ctypes.WinError() def symlink(target, name): @@ -101,7 +101,7 @@ else: assert path has_link_attr = GetFileAttributes(path) & FILE_ATTRIBUTE_REPARSE_POINT if win32_verbose: - print "islink(%s): attrs=%#x: %s"%(path, GetFileAttributes(path), has_link_attr != 0) + print("islink(%s): attrs=%#x: %s"%(path, GetFileAttributes(path), has_link_attr != 0)) return has_link_attr != 0 def DeviceIoControl(hDevice, ioControlCode, input, output): @@ -119,7 +119,7 @@ else: status = _DevIoCtl(hDevice, ioControlCode, input, input_size, output, output_size, bytesReturned, None) if win32_verbose: - print "DeviceIOControl: status = %d" % status + print("DeviceIOControl: status = %d" % status) if status != 0: return output[:bytesReturned.value] else: @@ -140,7 +140,7 @@ else: # This wouldn't return true if the file didn't exist, as far as I know. if not islink(path): if win32_verbose: - print "readlink(%s): not a link."%path + print("readlink(%s): not a link."%path) return None # Open the file correctly depending on the string type. @@ -153,7 +153,7 @@ else: # Minimum possible length (assuming length of the target is bigger than 0) if not buffer or len(buffer) < 9: if win32_verbose: - print "readlink(%s): no reparse buffer."%path + print("readlink(%s): no reparse buffer."%path) return None # Parse and return our result. @@ -192,16 +192,16 @@ else: start = SubstituteNameOffset + SymbolicLinkReparseSize actualPath = buffer[start : start + SubstituteNameLength].decode("utf-16") # This utf-16 string is null terminated - index = actualPath.find(u"\0") + index = actualPath.find("\0") if index > 0: actualPath = actualPath[:index] - if actualPath.startswith(u"\\??\\"): # ASCII 92, 63, 63, 92 + if actualPath.startswith("\\??\\"): # ASCII 92, 63, 63, 92 ret = actualPath[4:] # strip off leading junk else: ret = actualPath if win32_verbose: - print "readlink(%s->%s->%s): index(null) = %d"%\ - (path,repr(actualPath),repr(ret),index) + print("readlink(%s->%s->%s): index(null) = %d"%\ + (path,repr(actualPath),repr(ret),index)) return ret def realpath(fpath): -- cgit v1.2.3 From 223462880beed2dc3b3f3a74ec9e3d4db3cd1f14 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Wed, 30 Jan 2013 16:36:31 -0500 Subject: Add Alexandre Rossi as a contributer --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 7e14a61..ad4512c 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -15,3 +15,4 @@ Patches and Suggestions - Reinout van Rees - Daniel Harding - Gary Oberbrunner +- Alexandre Rossi -- cgit v1.2.3 From 017a7954c855e213a5f3559a1bb7868d69ae43c1 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Wed, 30 Jan 2013 16:40:32 -0500 Subject: Update history and bump version number --- HISTORY.rst | 5 +++++ dotfiles/core.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index d53e88d..ca040a8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,11 @@ History ------- +0.5.6 ++++++ + +* Restore python 3 compatibility + 0.5.5 +++++ diff --git a/dotfiles/core.py b/dotfiles/core.py index 00d0be1..20f9a1a 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -13,7 +13,7 @@ import shutil import fnmatch -__version__ = '0.5.5' +__version__ = '0.5.6' __author__ = 'Jon Bernard' __license__ = 'ISC' -- cgit v1.2.3