Esempio 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()
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())