Skip to content

Commit

Permalink
Merge branch 'cmutel-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed May 8, 2015
2 parents fd00419 + a8fd701 commit dc6da61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pyprind/prog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ def __repr__(self):
str_end, self.total_time)
else:
try:
cpu_total = self.process.cpu_percent()
mem_total = self.process.memory_percent()
except AttributeError: # old version of psutil
cpu_total = self.process.get_cpu_percent()
mem_total = self.process.get_memory_percent()
except AttributeError: # old version of psutil
cpu_total = self.process.cpu_percent()
mem_total = self.process.memory_percent()

return 'Title: {}\n'\
' Started: {}\n'\
Expand Down
6 changes: 3 additions & 3 deletions pyprind/progbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def __init__(self, iterations, track_time=True, width=30, stream=2, title='', mo
self._print_progress_bar(0)
if monitor:
try:
self.process.cpu_percent()
self.process.memory_percent()
except AttributeError: # old version of psutil
self.process.get_cpu_percent()
self.process.get_memory_percent()
except AttributeError: # old version of psutil
cpu_total = self.process.cpu_percent()
mem_total = self.process.memory_percent()
if self.item_id:
self._print_item_id()

Expand Down
6 changes: 3 additions & 3 deletions pyprind/progpercent.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def __init__(self, iterations, track_time=True, stream=2, title='', monitor=Fals
self._print()
if monitor:
try:
self.process.cpu_percent()
self.process.memory_percent()
except AttributeError: # old version of psutil
self.process.get_cpu_percent()
self.process.get_memory_percent()
except AttributeError: # old version of psutil
cpu_total = self.process.cpu_percent()
mem_total = self.process.memory_percent()


def _print(self):
Expand Down

0 comments on commit dc6da61

Please sign in to comment.