Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/0.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
sheenobu committed Jun 10, 2017
2 parents a5bb7d3 + fed8030 commit a3edbfe
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/writeFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
data = json.load(f)

for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"

if type(val) == str or type(val) == unicode:
print "Symlinking " + out + "/" + key
os.symlink(val, out + "/" + key)
if type(val) == str or type(val) == unicode:
print "Symlinking " + out + "/" + key
os.symlink(val, out + "/" + key)

if type(val) == dict:
print "Creating file " + out + "/" + key
o = open(out + "/" + key, "w")
o.write(val["content"])
if type(val) == dict:
print "Creating file " + out + "/" + key
with open(out + "/" + key, "w") as f:
f.write(val["content"].encode('UTF-8'))

0 comments on commit a3edbfe

Please sign in to comment.