Skip to content

Commit

Permalink
fix: jans-linux-setup code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Apr 26, 2022
1 parent b01da85 commit 45953c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def init(self, install_dir=INSTALL_DIR):
self.install_dir = install_dir
with open(os.path.join(self.install_dir, 'app_info.json')) as f:
self.app_info = json.load(f)
if not 'SETUP_BRANCH' in self.app_info:
if 'SETUP_BRANCH' not in self.app_info:
self.app_info['SETUP_BRANCH'] = 'main'

self.ox_version = self.app_info['JANS_APP_VERSION'] + self.app_info['JANS_BUILD']
Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/jans_setup/setup_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def init(self, install_dir=INSTALL_DIR):
self.install_dir = install_dir
with open(os.path.join(self.install_dir, 'app_info.json')) as f:
self.app_info = json.load(f)
if not 'SETUP_BRANCH' in self.app_info:
if 'SETUP_BRANCH' not in self.app_info:
self.app_info['SETUP_BRANCH'] = 'main'

self.ox_version = self.app_info['JANS_APP_VERSION'] + self.app_info['JANS_BUILD']
Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/jans_setup/setup_app/installers/jre.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def download_files(self, force=False, downloads=[]):
jdk_fn = os.path.basename(self.open_jdk_archive_link)

self.jreArchive = os.path.join(Config.distAppFolder, jdk_fn)
if not os.path.exists(self.jreArchive) or force and not (downloads and not src_name in downloads):
if not os.path.exists(self.jreArchive) or force and not (downloads and src_name not in downloads):
self.logIt("Downloading " + jdk_fn, pbar=self.service_name)
base.download(self.open_jdk_archive_link, self.jreArchive)
else:
Expand Down

0 comments on commit 45953c6

Please sign in to comment.