-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
Signed-off-by: Peace Lee <iipeace5@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
__credits__ = "Peace Lee" | ||
__license__ = "GPLv2" | ||
__version__ = "3.9.8" | ||
__revision__ = "210928" | ||
__revision__ = "210929" | ||
__maintainer__ = "Peace Lee" | ||
__email__ = "iipeace5@gmail.com" | ||
__repository__ = "https://github.com/iipeace/guider" | ||
|
@@ -16,15 +16,9 @@ | |
|
||
|
||
|
||
# import sys package # | ||
try: | ||
import sys | ||
except ImportError: | ||
print("[ERROR] failed to import sys package") | ||
sys.exit(0) | ||
|
||
# import essential packages # | ||
try: | ||
import sys | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
import os | ||
import re | ||
import gc | ||
|
@@ -37,8 +31,7 @@ | |
#from ctypes import * | ||
except ImportError: | ||
err = sys.exc_info()[1] | ||
print("[ERROR] failed to import essential package: %s" % err.args[0]) | ||
sys.exit(0) | ||
sys.exit("[ERROR] failed to import essential package: %s" % err.args[0]) | ||
|
||
# convert an unsupported type # | ||
try: | ||
|
@@ -4145,11 +4138,7 @@ def printSyscalls(systable): | |
bufstring += '\n' | ||
bufstring = "%s'%s', " % (bufstring, syscall) | ||
|
||
print(bufstring) | ||
|
||
print('total: %s' % len(systable)) | ||
|
||
sys.exit(0) | ||
sys.exit('%s\ntotal: %s' % (bufstring, len(systable))) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
iipeace
Author
Owner
|
||
|
||
|
||
|
||
|
@@ -49754,11 +49743,9 @@ def _updateTaskInfo(dbusData, sentData, recvData): | |
per = long(0) | ||
|
||
# get time info # | ||
if pid in sentData and \ | ||
name in sentData[pid]: | ||
if pid in sentData and name in sentData[pid]: | ||
data = sentData[pid][name] | ||
elif pid in recvData and \ | ||
name in recvData[pid]: | ||
elif pid in recvData and name in recvData[pid]: | ||
data = recvData[pid][name] | ||
else: | ||
continue | ||
|
@@ -49779,20 +49766,26 @@ def _updateTaskInfo(dbusData, sentData, recvData): | |
# check error # | ||
if data['err'] > 0: | ||
errstr = ', Err: %s' % data['err'] | ||
color = 'RED' | ||
else: | ||
errstr = '' | ||
color = 'CYAN' | ||
|
||
# set color # | ||
try: | ||
mtype, stats = name.lstrip('[').split(']', 1) | ||
mtype = DbusMgr.msgColorList[mtype.strip()] | ||
name = '[%s]%s' % (mtype, stats) | ||
except SystemExit: | ||
sys.exit(0) | ||
except: | ||
pass | ||
|
||
if data['max'] > 0: | ||
name = \ | ||
'%s {Min: %.3f, Avr: %.3f, Max: %.3f%s} %s' % \ | ||
(name, data['min'], avr, data['max'], | ||
name = ('%s {Min: %.3f, Avr: %.3f, Max: %.3f%s}' | ||
'%s') % (name, data['min'], avr, data['max'], | ||
errstr, wstat) | ||
|
||
count = convertNum(value['cnt']) | ||
size = convertSize(data['size']) | ||
name = convertColor(name, color) | ||
|
||
dbusList.append( | ||
"{0:>4}({1:>6}/{2:>3}%) {3:1}".format( | ||
|
@@ -61719,7 +61712,7 @@ def runEventLoop(self): | |
continue | ||
|
||
# print status # | ||
SysMgr.printErr( | ||
SysMgr.printWarn( | ||
'terminated %s(%s)' % (self.comm, self.pid)) | ||
|
||
# wait event # | ||
|
4 comments
on commit 76563b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you mix changes for different issues in such a commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though they were not major issues because of laziness ;)
I'll try to split commits by issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you think about to extend the collaboration with topic development branches (and corresponding merge commits) accordingly? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds great!
Then I should consider CONTRITBUTING.md.
Why do you insist to specify the statement “
import sys
” after the key word “try
”?