Browse code

Cleanup of a few lines ending with a ";"

Florent Viard authored on 2020/06/01 09:14:33
Showing 3 changed files
... ...
@@ -148,7 +148,7 @@ class ACL(object):
148 148
                 elif grantee.permission.upper() == permission:
149 149
                     return True
150 150
 
151
-        return False;
151
+        return False
152 152
 
153 153
     def grant(self, name, permission):
154 154
         if self.hasGrant(name, permission):
... ...
@@ -622,7 +622,7 @@ class CloudFront(object):
622 622
                     #       do this since S3 buckets that are set up as websites use custom origins.
623 623
                     #       Thankfully, the custom origin URLs they use start with the URL of the
624 624
                     #       S3 bucket. Here, we make use this naming convention to support this use case.
625
-                    distListIndex = getBucketFromHostname(d.info['CustomOrigin']['DNSName'])[0];
625
+                    distListIndex = getBucketFromHostname(d.info['CustomOrigin']['DNSName'])[0]
626 626
                     distListIndex = distListIndex[:len(uri.bucket())]
627 627
                 else:
628 628
                     # Aral: I'm not sure when this condition will be reached, but keeping it in there.
... ...
@@ -1324,8 +1324,8 @@ def cmd_sync_remote2local(args):
1324 1324
         deleted_count, deleted_size = (0, 0)
1325 1325
 
1326 1326
     def _download(remote_list, seq, total, total_size, dir_cache):
1327
-        original_umask = os.umask(0);
1328
-        os.umask(original_umask);
1327
+        original_umask = os.umask(0)
1328
+        os.umask(original_umask)
1329 1329
         file_list = remote_list.keys()
1330 1330
         file_list.sort()
1331 1331
         ret = EX_OK
... ...
@@ -1441,11 +1441,12 @@ def cmd_sync_remote2local(args):
1441 1441
             try:
1442 1442
                 # set permissions on destination file
1443 1443
                 if not is_empty_directory: # a normal file
1444
-                    mode = 0o777 - original_umask;
1445
-                else: # an empty directory, make them readable/executable
1444
+                    mode = 0o777 - original_umask
1445
+                else:
1446
+                    # an empty directory, make them readable/executable
1446 1447
                     mode = 0o775
1447 1448
                 debug(u"mode=%s" % oct(mode))
1448
-                os.chmod(deunicodise(dst_file), mode);
1449
+                os.chmod(deunicodise(dst_file), mode)
1449 1450
             except:
1450 1451
                 raise
1451 1452