+def _run(*args):
+ """Run the obexftp binary catching errors"""
+ command = "%s %s %s" % (obexftp_prog, obexftp_args, ' '.join(args))
+ logger.debug("Running command %s", command)
+ w, r, e = os.popen3(command, 'r')
+ w.close()
+ errors = e.read()
+ e.close()
+ result = r.read()
+ r.close()
+ logger.debug(" errors: %s", errors)
+ logger.debug(" result: %s", result)
+ return result, errors
+
+