Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import errors and warnings detected by pylint #6

Merged
merged 4 commits into from
Jul 7, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix pylint unused-import warnings
  • Loading branch information
moreati committed Jul 7, 2015
commit 7cfc9440ef0ac11fe63f9eb27f4dd4bd2ccb32d5
1 change: 0 additions & 1 deletion smartcard/Card.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
along with pyscard; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from smartcard.Exceptions import CardConnectionException, NoCardException
from smartcard.reader.Reader import Reader
from smartcard.System import readers
from smartcard.util import toHexString
Expand Down
2 changes: 0 additions & 2 deletions smartcard/CardConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
"""

from smartcard.CardConnectionEvent import CardConnectionEvent
from smartcard.Exceptions import SmartcardException
from smartcard.Observer import Observer
from smartcard.Observer import Observable


Expand Down
4 changes: 0 additions & 4 deletions smartcard/CardMonitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@
from time import sleep
import traceback

from smartcard.System import readers
from smartcard.Exceptions import CardRequestTimeoutException
from smartcard.Observer import Observer
from smartcard.Observer import Observable

from smartcard.CardType import AnyCardType
from smartcard.CardRequest import CardRequest

_START_ON_DEMAND_ = False
Expand Down Expand Up @@ -219,7 +216,6 @@ def __getattr__(self, name):


if __name__ == "__main__":
from smartcard.CardMonitoring import CardMonitor
print('insert or remove cards in the next 10 seconds')

# a simple card observer that prints added/removed cards
Expand Down
1 change: 0 additions & 1 deletion smartcard/CardService.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"""

from __future__ import print_function
from smartcard.Exceptions import SmartcardException
from smartcard.scard import *


Expand Down
4 changes: 0 additions & 4 deletions smartcard/ClassLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
License: PSF license (http:https://docs.python.org/license.html).
"""

import sys
import types


def get_mod(modulePath):
"""Import a module."""
return __import__(modulePath, globals(), locals(), [''])
Expand Down
1 change: 0 additions & 1 deletion smartcard/ExclusiveConnectCardConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from __future__ import print_function
from smartcard.CardConnection import CardConnection
from smartcard.CardConnectionDecorator import CardConnectionDecorator
from smartcard.Exceptions import CardConnectionException
from smartcard.scard import SCardConnect, SCardDisconnect
Expand Down
2 changes: 0 additions & 2 deletions smartcard/ExclusiveTransmitCardConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from __future__ import print_function
from smartcard.CardConnection import CardConnection
from smartcard.CardConnectionDecorator import CardConnectionDecorator
from smartcard.Exceptions import CardConnectionException
from smartcard.scard import SCardBeginTransaction, SCardEndTransaction
from smartcard.scard import SCARD_LEAVE_CARD
from smartcard.scard import SCardGetErrorMessage
from smartcard.pcsc import PCSCCardConnection
import smartcard.pcsc


Expand Down
1 change: 0 additions & 1 deletion smartcard/PassThruCardService.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def supports(cardname):
SELECT = [0xA0, 0xA4, 0x00, 0x00, 0x02]
DF_TELECOM = [0x7F, 0x10]
from smartcard.System import readers
from smartcard.CardConnection import CardConnection
cc = readers()[0].createConnection()
cs = PassThruCardService(cc)
cs.connection.connect()
Expand Down
4 changes: 1 addition & 3 deletions smartcard/ReaderMonitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@
"""

from __future__ import print_function
from threading import Thread, Event, enumerate
from threading import Thread, Event
from time import sleep
import traceback

import smartcard.System
from smartcard.Exceptions import ListReadersException
from smartcard.Observer import Observer
from smartcard.Observer import Observable
from smartcard.Synchronization import *
Expand Down Expand Up @@ -204,7 +203,6 @@ def stop(self):
self.join()

if __name__ == "__main__":
from smartcard.ReaderMonitoring import ReaderMonitor
print('insert or remove readers in the next 20 seconds')

# a simple reader observer that prints added/removed readers
Expand Down
1 change: 0 additions & 1 deletion smartcard/Session.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from __future__ import print_function
from smartcard.Exceptions import InvalidReaderException, NoReadersException
from smartcard.CardConnection import CardConnection
from smartcard.PassThruCardService import PassThruCardService
from smartcard.System import readers

Expand Down
1 change: 0 additions & 1 deletion smartcard/pcsc/PCSCCardConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from smartcard.CardConnection import CardConnection
from smartcard.Exceptions import (CardConnectionException,
NoCardException, SmartcardException)
from smartcard.Observer import Observable

from smartcard.scard import *

Expand Down
3 changes: 1 addition & 2 deletions smartcard/pyro/PyroReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
import Pyro.core
import Pyro.naming

from smartcard.Exceptions import CardConnectionException, NoCardException
from smartcard.Exceptions import NoCardException
from smartcard.reader.Reader import Reader
from smartcard.reader.ReaderFactory import ReaderFactory


class PyroReader(Reader):
Expand Down
1 change: 0 additions & 1 deletion smartcard/pyro/server/PyroEventServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def __call__(self, signame, sf):


if __name__ == '__main__':
import sys
from smartcard.pyro.server.PyroNameServer import PyroNameServer
pn = PyroNameServer(sys.argv[1:])
pn.start()
Expand Down
3 changes: 0 additions & 3 deletions smartcard/pyro/server/RemoteCardConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
import Pyro.core
import Pyro.naming

from smartcard.CardConnection import CardConnection
from smartcard.CardConnectionDecorator import CardConnectionDecorator
from smartcard.Exceptions import CardConnectionException, NoCardException
from smartcard.Observer import Observable


class RemoteCardConnection(CardConnectionDecorator, Pyro.core.ObjBase):
Expand Down
4 changes: 0 additions & 4 deletions smartcard/pyro/server/RemoteReaderServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
import sys
sys.exit()

import signal
import time

import smartcard.System
from smartcard.reader.Reader import Reader
from smartcard.ReaderMonitoring import ReaderMonitor, ReaderObserver
from smartcard.pyro.server.RemoteCardConnection import RemoteCardConnection
Expand Down