diff options
| -rw-r--r-- | xlators/features/marker/utils/syncdaemon/repce.py | 17 | ||||
| -rw-r--r-- | xlators/features/marker/utils/syncdaemon/resource.py | 2 | 
2 files changed, 11 insertions, 8 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/repce.py b/xlators/features/marker/utils/syncdaemon/repce.py index aebc8b7d80c..1b8d0203cff 100644 --- a/xlators/features/marker/utils/syncdaemon/repce.py +++ b/xlators/features/marker/utils/syncdaemon/repce.py @@ -65,12 +65,15 @@ class RepceServer(object):              rid = in_data[0]              rmeth = in_data[1]              exc = False -            try: -                res = getattr(self.obj, rmeth)(*in_data[2:]) -            except: -                res = sys.exc_info()[1] -                exc = True -                logging.exception("call failed: ") +            if rmeth == '__repce_version__': +                res = repce_version +            else: +              try: +                  res = getattr(self.obj, rmeth)(*in_data[2:]) +              except: +                  res = sys.exc_info()[1] +                  exc = True +                  logging.exception("call failed: ")              send(self.out, rid, exc, res) @@ -151,7 +154,7 @@ class RepceClient(object):          return self.mprx(self, meth)      def __version__(self): -        d = {'proto': repce_version} +        d = {'proto': self('__repce_version__')}          try:              d['object'] = self('version')          except AttributeError: diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 6697ab8c485..efd1360758f 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -428,7 +428,7 @@ class SSH(AbstractUrl, SlaveRemote):              # in daemon), we just do a an ad-hoc linear put/get.              i, o = ret              inf = os.fdopen(i) -            repce.send(o, None, 'ping') +            repce.send(o, None, '__repce_version__')              select.select((inf,), (), ())              repce.recv(inf)              # hack hack hack: store a global reference to the file  | 
