| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | #!/usr/bin/python |
||
| 15 | def create_daemon_file(): |
||
| 16 | print("start to create daemon file now...") |
||
| 17 | print("start download and parse new daemon file:") |
||
| 18 | print("URL: "+metadata.daemon_online_template) |
||
| 19 | print("FILE: "+metadata.daemon_file) |
||
| 20 | with open(metadata.daemon_file, "w") as daemon_file: |
||
| 21 | for line in urllib2.urlopen(metadata.daemon_online_template): |
||
| 22 | daemon_file.write(parse_string(line)) |
||
| 23 | print("download successfully - change chmod to 0755 now") |
||
| 24 | os.chmod(metadata.daemon_file, 0755) |
||
| 25 | print "finished" |
||
| 26 | |||
| 29 |