summaryrefslogtreecommitdiffstats
path: root/func/utils.py
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-13 11:55:53 +0300
committermakkalot <makkalot@gmail.com>2008-08-13 11:55:53 +0300
commit14dbbf0b9d7f50d2dffaf2306b21e41d3e7e8cdc (patch)
tree4ed2b10efafbc81850d31c629da337d33369706e /func/utils.py
parent56ba41a1a331ebff0c471d6f85b1c7c11a1ab6d8 (diff)
parent32689058c602362dcab1b1ae564d86ecc04c4b79 (diff)
merge master into the export_methods branch
Diffstat (limited to 'func/utils.py')
-rwxr-xr-xfunc/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/func/utils.py b/func/utils.py
index 628694d..891f459 100755
--- a/func/utils.py
+++ b/func/utils.py
@@ -15,6 +15,7 @@ import string
import sys
import traceback
import socket
+import inspect
REMOTE_ERROR = "REMOTE_ERROR"
@@ -52,3 +53,10 @@ def get_formated_jobid(**id_pack):
job_id = "".join([glob,"-",module,"-",method,"-",pprint.pformat(time.time())])
return job_id
+def is_public_valid_method(obj, attr, blacklist=[]):
+ if inspect.ismethod(getattr(obj, attr)) and attr[0] != '_':
+ for b in blacklist:
+ if attr==b:
+ return False
+ return True
+ return False