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

Loading…
Cancel
Save