mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
scripts: Fix an issue in get_recent_deployments() due to relative paths.
We were checking for whether an item in the deployments directory represents a directory but were using its relative path which was causing a false value to be returned for all items irrespective of their being a directory or not if the script was invoked from some where other than the deployments directory.
This commit is contained in:
committed by
Tim Abbott
parent
f010ed117b
commit
a6caf30ca7
@@ -189,7 +189,7 @@ def get_recent_deployments(threshold_days):
|
||||
recent = set()
|
||||
threshold_date = datetime.datetime.now() - datetime.timedelta(days=threshold_days)
|
||||
for dir_name in os.listdir(DEPLOYMENTS_DIR):
|
||||
if not os.path.isdir(dir_name):
|
||||
if not os.path.isdir(os.path.join(DEPLOYMENTS_DIR, dir_name)):
|
||||
# Skip things like uwsgi sockets.
|
||||
continue
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user