Public » Kiln Backup
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

tip use json parser instead of evaling JSON

Changeset 32652ba62339

Parent 38d566246d72

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to one file · Browse files at 32652ba62339 Showing diff from parent 38d566246d72 Diff from another changeset...

Change 1 of 3 Show Entire File kilnbackup.py Stacked
 
24
25
26
 
27
28
29
 
87
88
89
90
91
92
93
94
95
 
97
98
99
100
 
101
102
103
 
24
25
26
27
28
29
30
 
88
89
90
 
 
 
91
92
93
 
95
96
97
 
98
99
100
101
@@ -24,6 +24,7 @@
 import ConfigParser  import cookielib  import getpass +import json  import os  import shutil  import subprocess @@ -87,9 +88,6 @@
    return js   -def jseval(js): - return eval(js, {"null":None, "true":True, "false":False}) -  def build_url(path):   url = server + path   return url.replace("://", "://%s:%s@" % ( @@ -97,7 +95,7 @@
  urllib.quote(settings["password"], '')   ))   -for repo in jseval(get_repos()): +for repo in json.loads(get_repos()):   url = build_url(repo["url"])   name = os.path.split(repo["url"])[-1]