How to use the pysmb._None function in pysmb

To help you get started, we’ve selected a few pysmb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenPrinting / system-config-printer / pysmb.py View on Github external
import smbc
from debug import *

class _None(RuntimeError):
    pass

try:
    NoEntryError = smbc.NoEntryError
    PermissionError = smbc.PermissionError
    ExistsError = smbc.ExistsError
    NotEmptyError = smbc.NotEmptyError
    TimedOutError = smbc.TimedOutError
    NoSpaceError = smbc.NoSpaceError
except AttributeError:
    NoEntryError = PermissionError = ExistsError = _None
    NotEmptyError = TimedOutError = NoSpaceError = _None

class AuthContext:
    def __init__ (self, parent=None, workgroup='', user='', passwd=''):
        self.passes = 0
        self.has_failed = False
        self.auth_called = False
        self.tried_guest = False
        self.cancel = False
        self.use_user = user
        self.use_password = passwd
        self.use_workgroup = workgroup
        self.dialog_shown = False
        self.parent = parent

    def perform_authentication (self):
        self.passes += 1
github OpenPrinting / system-config-printer / pysmb.py View on Github external
import pwd
import smbc
from debug import *

class _None(RuntimeError):
    pass

try:
    NoEntryError = smbc.NoEntryError
    PermissionError = smbc.PermissionError
    ExistsError = smbc.ExistsError
    NotEmptyError = smbc.NotEmptyError
    TimedOutError = smbc.TimedOutError
    NoSpaceError = smbc.NoSpaceError
except AttributeError:
    NoEntryError = PermissionError = ExistsError = _None
    NotEmptyError = TimedOutError = NoSpaceError = _None

class AuthContext:
    def __init__ (self, parent=None, workgroup='', user='', passwd=''):
        self.passes = 0
        self.has_failed = False
        self.auth_called = False
        self.tried_guest = False
        self.cancel = False
        self.use_user = user
        self.use_password = passwd
        self.use_workgroup = workgroup
        self.dialog_shown = False
        self.parent = parent

    def perform_authentication (self):

pysmb

pysmb is an experimental SMB/CIFS library written in Python to support file sharing between Windows and Linux machines

(Libpng OR Zlib)
Latest version published 2 months ago

Package Health Score

82 / 100
Full package analysis

Similar packages