Skip to content

Commit

Permalink
Update reposync_is_running() for psutil 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
timsutton committed Jul 14, 2015
1 parent 352952a commit 148a702
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions repo_sync_and_mail/repo_sync_and_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# also contain the contents of English.dist for any new products.
#
# Additional requirements:
# - 'psutil' module, available from PyPi, minimum version 2.0.0
# - 'psutil' module, available from PyPi - version currently tested with this script is
# 2.1.1, provided by the Debian Jessie 'python-psutil' apt package

import os
import sys
Expand Down Expand Up @@ -37,7 +38,7 @@ def reposync_is_running():
proclist = psutil.get_process_list()
for p in proclist:
for arg in p.cmdline():
if os.path.split(arg)[1] == 'repo_sync':
if os.path.basename(arg) == 'repo_sync':
return True
return False

Expand Down

0 comments on commit 148a702

Please sign in to comment.