Exemplo n.º 1
0
def checkPortConflict(knockPort):
    if not os.path.isdir(PROFILES_DIR):
        return

    profiles        = Profiles(PROFILES_DIR)
    matchingProfile = profiles.getProfileForPort(knockPort)

    if matchingProfile is not None:
        print "A profile already exists for knock port: " + str(knockPort) + " at this location: " + matchingProfile.getDirectory()
Exemplo n.º 2
0
def checkPortConflict(knockPort):
    if (not os.path.isdir(PROFILES_DIR)):
        return

    profiles = Profiles(PROFILES_DIR)
    matchingProfile = profiles.getProfileForPort(knockPort)

    if (matchingProfile != None):
        print('A profile already exists for knock port: ' + str(knockPort) +
              ' at this location: ' + matchingProfile.getDirectory())