Skip to content

Commit

Permalink
fixed --add-to-report crash
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismy-github committed Mar 26, 2022
1 parent 0f55529 commit 7d18d84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
parser.add_argument('--destination', default=CWD, help='The destination to unpack the zip file')
parser.add_argument('--cmd', help='The command to run after unpacking')
parser.add_argument('--lock-files', nargs='*', default=None, help='File(s) that must be deleted before unpacking, typically PID files')
parser.add_argument('--add-to-report', nargs='?', default=None, help='Data to always include at the top of the report file')
parser.add_argument('--add-to-report', nargs='*', default=None, help='Data to always include at the top of the report file')
parser.add_argument('--report-path', default=os.path.join(CWD, 'update_report.txt'), help='Path/name of the report file that will be generated')
parser.add_argument('--delete', action=argparse.BooleanOptionalAction, default=False, help='Delete the zip file after successfully unpacking')
args = parser.parse_args()
Expand All @@ -53,7 +53,7 @@


with open(args.report_path, 'w') as report:
if args.add_to_report: report.write(f'{args.add_to_report}\n')
for line in args.add_to_report: report.write(f'{line}\n')
report.write(f'{args.zip}\n')
if report_text: report.write(report_text)

Expand Down
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# ---------------------

VERSION = 'pyplayer 0.1.1 beta'
VERSION = 'pyplayer 0.1.2 beta'
REPOSITORY_URL = 'https://github.com/thisismy-github/pyplayer'
SCRIPT_START_TIME = time.time()

Expand Down
2 changes: 1 addition & 1 deletion update.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def download_update(self, latest_version, download_url, download_path):
if self.video or qtstart.args.file: args.append(f'"{self.video or qtstart.args.file}"')
if qtstart.args.play_and_exit: args.append('"--play-and-exit"')
cmd_args = f' {" ".join(args)}' if args else ''
add_to_report = f'{constants.VERSION.split()[1]} -> {latest_version}\n"{active_updater_path}"'
add_to_report = f'"{constants.VERSION.split()[1]} -> {latest_version}" "{active_updater_path}"'

logger.info('PyPlayer closing, updater-utility starting...')
updater_cmd = (f'{active_updater_path} '
Expand Down

0 comments on commit 7d18d84

Please sign in to comment.