From c2b4d5a8c82ad58d54bc3c132252e3871af0c245 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Mon, 28 Nov 2022 06:19:02 -0500 Subject: [PATCH] dist: get Ubuntu version from dpkg-parsechangelog --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index b6229934..578bae81 100755 --- a/setup.py +++ b/setup.py @@ -25,15 +25,15 @@ except Exception: # get commit from Ubuntu dpkg-parsechangelog match = re.search(r'\nVersion: (.*)~', dpkg) print('VERSION', match.group(0), match.group(1)) with open('lib/solaar/commit', 'w') as vfile: - vfile.write(f'{match.group[1]}\n') + vfile.write(f'{match.group(1)}\n') print('Version', subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'Version']).strip().decode()) print('version', subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'version']).strip().decode()) print('Version', subprocess.check_output(['dpkg-parsechangelog', '--show-field=Version']).strip().decode()) print('version', subprocess.check_output(['dpkg-parsechangelog', '--show-field=version']).strip().decode()) # with open('lib/solaar/commit', 'w') as vfile: # vfile.write(f'{commit]}\n') - except Exception: - pass + except Exception as e: + print('Exception using dpkg-parsechangelog', e) def _data_files():