Tweak exception handling indentation to avoid a bug in 2to3.
authorZac Medico <zmedico@gentoo.org>
Thu, 19 Feb 2009 11:48:09 +0000 (11:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Feb 2009 11:48:09 +0000 (11:48 -0000)
svn path=/main/trunk/; revision=12646

pym/portage/cache/flat_hash.py

index b9781b0c7d7cd4e21c811a6fdd582c3b9af4ebf2..dda380e1c6be624620598ec1e1ff1583a853b48f 100644 (file)
@@ -65,7 +65,8 @@ class database(fs_template.FsBased):
 #              import pdb;pdb.set_trace()
                s = cpv.rfind("/")
                fp = os.path.join(self.location,cpv[:s],".update.%i.%s" % (os.getpid(), cpv[s+1:]))
-               try:    myf=open(fp, "w")
+               try:
+                       myf = open(fp, 'w')
                except (IOError, OSError), e:
                        if errno.ENOENT == e.errno:
                                try:
@@ -89,7 +90,8 @@ class database(fs_template.FsBased):
                #update written.  now we move it.
 
                new_fp = os.path.join(self.location,cpv)
-               try:    os.rename(fp, new_fp)
+               try:
+                       os.rename(fp, new_fp)
                except (OSError, IOError), e:
                        os.remove(fp)
                        raise cache_errors.CacheCorruption(cpv, e)