Group :: Development/Python3
RPM: python3-module-pyscard
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: pyscard-2.0.7-Pyro5.patch
Download
Download
diff --git a/smartcard/pyro/PyroReader.py b/smartcard/pyro/PyroReader.py
index aeb746b..abc5ab7 100644
--- a/smartcard/pyro/PyroReader.py
+++ b/smartcard/pyro/PyroReader.py
@@ -22,8 +22,8 @@ along with pyscard; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
-import Pyro.core
-import Pyro.naming
+import Pyro5.core
+import Pyro5.nameserver
from smartcard.Exceptions import NoCardException
from smartcard.reader.Reader import Reader
@@ -35,9 +35,9 @@ class PyroReader(Reader):
"""Constructs a new Remote Reader client implementation from a
Pyro URI."""
super().__init__(readername)
- ns = Pyro.naming.NameServerLocator().getNS()
+ ns = Pyro5.nameserver.NameServerLocator().getNS()
self.uri = ns.resolve(':pyscard.smartcard.readers.' + readername)
- self.reader = Pyro.core.getAttrProxyForURI(self.uri)
+ self.reader = Pyro5.core.URI(self.uri)
self.name = self.reader.name
def addtoreadergroup(self, groupname):
@@ -51,7 +51,7 @@ class PyroReader(Reader):
def createConnection(self):
"""Return a card connection thru a remote reader."""
uri = self.reader.createConnection()
- return Pyro.core.getAttrProxyForURI(uri)
+ return Pyro5.core.URI(uri)
class Factory:
def create(readername):
@@ -61,9 +61,9 @@ class PyroReader(Reader):
def readers(groups=[]):
readernames = []
try:
- ns = Pyro.naming.NameServerLocator().getNS()
+ ns = Pyro5.nameserver.NameServerLocator().getNS()
readernames = ns.list(':pyscard.smartcard.readers')
- except Pyro.errors.NamingError:
+ except Pyro5.errors.NamingError:
print('Warning: pyro name server not found')
remotereaders = []