Guest User

Untitled

a guest
May 7th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.84 KB | None | 0 0
  1. for line in f:
  2.             line = line.rstrip()
  3.             if re.match("da",line):
  4.                 (da,ID) = (line.split())[1:3]
  5.                 try:
  6.                         da_dict[da].append(ID)
  7.                 except KeyError:
  8.                         da_dict[da] = [ID]
  9.             if re.match("cc",line):
  10.                 cc = (line.split())[1]
  11.             if re.match("user",line):
  12.                 user = (line.split())[1]
  13.             if re.match("pass",line):
  14.                 passwd = (line.split())[1]
  15.         aDummyHandler = Dummy()
  16.         protocol.rci_facility.handlers[:0] = [aDummyHandler]
  17.         for key in da_dict.iterkeys():
  18.                 for an_id in key:
  19.                     devices = device_slimulator.connect_devices(key, 1,
  20.                             cc,da_dict[key][an_id],username=user,password=passwd,protocol=protocol)
Add Comment
Please, Sign In to add comment