Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2014
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. Failed to save!
  2. UNHANDLED EXCEPTION (2014-02-24 04:03:56.285549) Working directory: /opt/noc Invalid MAC: '' START OF TRACEBACK ------------------------------------------------------------------------ File: /opt/noc/lib/mac.py (Line: 98) Function: _clean 91 match = rx_mac_address_hp.match(value) 92 if match: 93 value = value.replace("-", "") 94 else: 95 value = value.replace("-", ":") 96 match = rx_mac_address_sixblock.match(value) 97 if not match: 98 ==> raise ValueError("Invalid MAC: '%s'" % mac) 99 value = "" 100 for i in range(1, 7): 101 v = match.group(i) 102 if len(v) == 1: 103 v = "0" + v 104 value += v Variables: mac = '' value = '' match = None self = ------------------------------------------------------------------------ File: /opt/noc/lib/mac.py (Line: 70) Function: __new__ 63 'AA:BB:CC:DD:EE:FF' 64 >>> MAC("AABBCCDDEEFF") 65 'AA:BB:CC:DD:EE:FF' 66 >>> MAC("AABBCCDDEEFF") + " -- " + MAC("0011.2233.4455") 67 'AA:BB:CC:DD:EE:FF -- 00:11:22:33:44:55' 68 """ 69 def __new__(cls, mac): 70 ==> return super(MAC, cls).__new__(cls, cls._clean(mac)) 71 72 @classmethod 73 def _clean(self, mac): 74 value = mac 75 value = value.upper() 76 match = rx_mac_address_solid.match(value) Variables: mac = '' cls = ------------------------------------------------------------------------ File: /opt/noc/inv/models/macdb.py (Line: 43) Function: save 36 interface = PlainReferenceField(Interface) 37 last_changed = DateTimeField() 38 39 def __unicode__(self): 40 return self.mac 41 42 def save(self): 43 ==> self.mac = MAC(self.mac) 44 if not self.last_changed: 45 self.last_changed = datetime.datetime.now() 46 super(MACDB, self).save() 47 48 @classmethod 49 def submit(cls, mac, vc_domain, vlan, interface, timestamp=None): Variables: self = ------------------------------------------------------------------------ File: /opt/noc/lib/app/extdocapplication.py (Line: 229) Function: api_create 222 if q: 223 if self.queryset(request).filter(**q).first(): 224 return self.response(status=self.CONFLICT) 225 o = self.model() 226 for k, v in attrs.items(): 227 if k != self.pk and "__" not in k: 228 setattr(o, k, v) 229 ==> o.save() 230 format = request.GET.get(self.format_param) 231 if format == "ext": 232 r = { 233 "success": True, 234 "data": self.instance_to_dict(o) 235 } Variables: k = 'interface' request = , POST:, COOKIES:{'sessionid': 'b07016f45c392d82b5a831ccb93da60e'}, META:{'CONTENT_LENGTH': '95', 'CONTENT_TYPE': 'application/json; charset=UTF-8', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 'sessionid=b07016f45c392d82b5a831ccb93da60e', 'HTTP_HOST': 'localhost:8000', 'HTTP_PRAGMA': 'no-cache', 'HTTP_REFERER': 'http://ncc.pu.ru/main/desktop/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0', 'HTTP_X_FORWARDED_FOR': '195.70.199.94', 'HTTP_X_FORWARDED_HOST': 'ncc.pu.ru', 'HTTP_X_FORWARDED_SERVER': 'ncc.pu.ru', 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', 'PATH_INFO': u'/inv/macdb/', 'QUERY_STRING': '_dc=1393185867020&__format=ext', 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'wsgi.errors': , 'wsgi.input':
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement