Tweak exception handling indentation to avoid a bug in 2to3. (trunk r12646)
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 05:55:18 +0000 (05:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 05:55:18 +0000 (05:55 -0000)
svn path=/main/branches/2.1.6/; revision=12917

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)