Skip to content

Commit

Permalink
Fix E0601: Using variable 'result' before assignment (used-before-ass…
Browse files Browse the repository at this point in the history
…ignment)
  • Loading branch information
nzlosh committed Mar 29, 2024
1 parent 2c15886 commit 12b9eda
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions contrib/packs/actions/pack_mgmt/get_pack_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 The StackStorm Authors.
# Copyright 2020-2024 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -125,9 +125,9 @@ def get_pack_version(pack=None):
pack_metadata = get_pack_metadata(pack_dir=pack_path)
result = pack_metadata.get("version", None)
except Exception:
result = None
finally:
return result
return None

return result


def get_dependency_list(pack=None):
Expand All @@ -138,6 +138,6 @@ def get_dependency_list(pack=None):
result = pack_metadata.get("dependencies", None)
except Exception:
print("Could not open pack.yaml at location %s" % pack_path)
result = None
finally:
return result
return None

return result

0 comments on commit 12b9eda

Please sign in to comment.