Browse Source

fixed list.copy() for older python version

tags/v1.0.0
Robin Thoni 7 years ago
parent
commit
1d06af4565
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      sitegen.py

+ 3
- 3
sitegen.py View File

@@ -93,14 +93,14 @@ class SiteGen:
93 93
                 path.abspath(path.join(self.certDir, domain + "-chain.crt"))]
94 94
 
95 95
     def execute(self, exe, args, get_output):
96
-        args = args.copy()
96
+        args = args[:]
97 97
         args.insert(0, exe)
98 98
         proc = subprocess.Popen(args, stdout=(subprocess.PIPE if get_output else None))
99 99
         out = proc.communicate()
100 100
         return proc.returncode, out[0]
101 101
 
102 102
     def execute_hooks(self, hook_type, hook_event, args):
103
-        args = args.copy()
103
+        args = args[:]
104 104
         args.insert(0, hook_event)
105 105
         for hook_name in self.get_hook_files(hook_type, True):
106 106
             self.execute(self.get_hook_file(hook_type, hook_name, True), args, False)
@@ -210,7 +210,7 @@ class SiteGen:
210 210
 
211 211
         command = self.get_letsencrypt_command(domain)
212 212
 
213
-        args = command['letsencryptArgs'].copy()
213
+        args = command['letsencryptArgs'][:]
214 214
         args.append("-d")
215 215
         args.append(domain)
216 216
 

Loading…
Cancel
Save