Skip to content

Commit

Permalink
added verbose flag
Browse files Browse the repository at this point in the history
  • Loading branch information
badstreff committed Nov 15, 2017
1 parent 8914718 commit 66360e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ async def get_script_template(session, url, user, passwd, script):
else:
template = ET.parse(join(mypath, 'templates/script.xml')).getroot()
# name is mandatory, so we use the filename if nothing is set in a template
print(ET.tostring(template))
if args.verbose:
print(ET.tostring(template))
if template.find('name') is None:
ET.SubElement(template, 'name').text = script
elif template.find('name').text is '' or template.find('name').text is None:
Expand All @@ -98,6 +99,7 @@ async def main(args):
parser.add_argument('--url')
parser.add_argument('--username')
parser.add_argument('--password')
parser.add_argument('--verbose', action='store_true')
args = parser.parse_args()

loop = asyncio.get_event_loop()
Expand Down

0 comments on commit 66360e7

Please sign in to comment.