mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 03:59:17 +00:00
improve error check on external commands
This commit is contained in:
@@ -52,7 +52,8 @@ class Templategen:
|
||||
|
||||
def _handle_file(self, src):
|
||||
"""generate the file content from template"""
|
||||
filetype = utils.run(['file', '-b', src], raw=False, debug=self.debug)
|
||||
_, filetype = utils.run(['file', '-b', src],
|
||||
raw=False, debug=self.debug)
|
||||
filetype = filetype.strip()
|
||||
if self.debug:
|
||||
self.log.dbg('\"{}\" filetype: {}'.format(src, filetype))
|
||||
|
||||
Reference in New Issue
Block a user