bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
449,200
def log_node(self, log_type, node, text, context=None): """Log a warning, using information about file positions from
def log_node(self, log_type, node, text, context=None): """Log a warning, using information about file positions from
449,201
def _fixup_param_destroy(self, parent, param): for p in parent.parameters: if p is not param and p.destroy_index == param.destroy_index: p.destroy_index = None
def _fixup_param_destroy(self, parent, param): for p in parent.parameters: if p is not param and p.destroy_index == param.destroy_index: p.destroy_index = None
449,202
def _fixup_param_closure(self, parent, param): for p in parent.parameters: if p is not param and p.closure_index == param.closure_index: p.closure_index = None
def _fixup_param_closure(self, parent, param): for p in parent.parameters: if p is not param and p.closure_index == param.closure_index: p.closure_index = None
449,203
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
449,204
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
449,205
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
449,206
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
def _link(self, output, *sources): args = [] libtool = get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
449,207
def _pass_read_annotations(self, node, chain): if not node.namespace: return False if isinstance(node, ast.Alias): self._apply_annotations_alias(node, chain) if isinstance(node, ast.Function): self._apply_annotations_function(node, chain) if isinstance(node, ast.Callback): self._apply_annotations_callable(node, chain, ...
def _pass_read_annotations(self, node, chain): if not node.namespace: return False if isinstance(node, ast.Alias): self._apply_annotations_alias(node, chain) if isinstance(node, ast.Function): self._apply_annotations_function(node, chain) if isinstance(node, ast.Callback): self._apply_annotations_callable(node, chain, ...
449,208
def _get_transfer_default_return(self, parent, node): typeval = node.type basic = self._get_transfer_default_returntype_basic(typeval) if basic: return basic if not typeval.target_giname: return None target = self._transformer.lookup_typenode(typeval) if isinstance(target, ast.Alias): return self._get_transfer_default_...
def _get_transfer_default_return(self, parent, node): typeval = node.type basic = self._get_transfer_default_returntype_basic(typeval) if basic: return basic if not typeval.target_giname: return None target = self._transformer.lookup_typenode(typeval) if isinstance(target, ast.Alias): return self._get_transfer_default_...
449,209
def _link(self, output, *sources): args = [] libtool = utils.get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
def _link(self, output, *sources): args = [] libtool = utils.get_libtool_command(self._options) if libtool: args.extend(libtool) args.append('--mode=link') args.append('--tag=CC') args.append('--silent')
449,210
def _get_option_parser(): parser = optparse.OptionParser('%prog [options] sources') parser.add_option('', "--quiet", action="store_true", dest="quiet", default=False, help="If passed, do not print details of normal" \ + " operation") parser.add_option("", "--format", action="store", dest="format", default="gir", help="...
def _get_option_parser(): parser = optparse.OptionParser('%prog [options] sources') parser.add_option('', "--quiet", action="store_true", dest="quiet", default=False, help="If passed, do not print details of normal" \ + " operation") parser.add_option("", "--format", action="store", dest="format", default="gir", help="...
449,211
def _parse_param_ret_common(self, parent, node, tag): options = getattr(tag, 'options', {}) node.direction = self._extract_direction(node, options) container_type = self._extract_container_type( parent, node, options) if container_type is not None: node.type = container_type if node.direction is None: node.direction = ...
def _parse_param_ret_common(self, parent, node, tag): options = getattr(tag, 'options', {}) node.direction = self._extract_direction(node, options) container_type = self._extract_container_type( parent, node, options) if container_type is not None: node.type = container_type if node.direction is None: node.direction = ...
449,212
def get_widget(self, widget_name): widget = gtk.glade.XML.get_widget(self, widget_name) print widget_name, widget if widget is None: print "ERROR: widget %s was not found" % widget_name raise Exception ("Widget %s not found" % widget_name) return widget
def get_widget(self, widget_name): widget = gtk.glade.XML.get_widget(self, widget_name) if widget is None: print "ERROR: widget %s was not found" % widget_name raise Exception ("Widget %s not found" % widget_name) return widget
449,213
def __init__(self): glade_prefix = os.path.dirname(__file__)
def __init__(self): glade_prefix = os.path.dirname(__file__)
449,214
def read(self, path): f = open(path) section = self.section[None] for line in f.readlines(): line = line.strip() if line.startswith('[') and line.endswith(']'): name = line[1:-1].strip() section = self.newsection(name) self.section[name] = section continue if line.startswith('#'): continue part = line.split('=', 1) if ...
def read(self, path): f = open(path) section = self.section[None] for line in f.readlines(): line = line.strip() if line.startswith('[') and line.endswith(']'): name = line[1:-1].strip() section = self.newsection(name) self.section[name] = section continue if line.startswith('#'): continue part = line.split('=', 1) if ...
449,215
def _request(self, request_type, method, info=None): handler = self.apihandler + method if self.cert_file: context = SSL.Context("sslv3") context.load_cert(self.cert_file, keyfile=self.key_file) conn = httpslib.HTTPSConnection(self.host, self.ssl_port, ssl_context=context) else: conn = httplib.HTTPConnection(self.host,...
def _request(self, request_type, method, info=None): handler = self.apihandler + method if self.cert_file: context = SSL.Context("sslv3") context.load_cert(self.cert_file, keyfile=self.key_file) conn = httpslib.HTTPSConnection(self.host, self.ssl_port, ssl_context=context) else: conn = httplib.HTTPSConnection(self.host...
449,216
def onUnsubscribeAction(self, button): global UEP if not self.psubs_selected: return log.info("Product %s selected for unsubscribe" % self.pname_selected) dlg = messageWindow.YesNoDialog(constants.CONFIRM_UNSUBSCRIBE % self.pname_selected, self.mainWin) if not dlg.getrc(): return #print self.psubs_selected if not UEP: ...
def onUnsubscribeAction(self, button): global UEP if not self.psubs_selected: return log.info("Product %s selected for unsubscribe" % self.pname_selected) dlg = messageWindow.YesNoDialog(constants.CONFIRM_UNSUBSCRIBE % self.pname_selected, self.mainWin) if not dlg.getrc(): return #print self.psubs_selected if Consumer...
449,217
def onUnsubscribeAction(self, button): global UEP if not self.psubs_selected: return log.info("Product %s selected for unsubscribe" % self.pname_selected) dlg = messageWindow.YesNoDialog(constants.CONFIRM_UNSUBSCRIBE % self.pname_selected, self.mainWin) if not dlg.getrc(): return #print self.psubs_selected if not UEP: ...
def onUnsubscribeAction(self, button): global UEP if not self.psubs_selected: return log.info("Product %s selected for unsubscribe" % self.pname_selected) dlg = messageWindow.YesNoDialog(constants.CONFIRM_UNSUBSCRIBE % self.pname_selected, self.mainWin) if not dlg.getrc(): return #print self.psubs_selected if not UEP: ...
449,218
def __init__(self): usage = "usage: %prog register [OPTIONS]" shortdesc = "register the client to a Unified Entitlement Platform." desc = "register"
def __init__(self): usage = "usage: %prog register [OPTIONS]" shortdesc = "register the client to a Unified Entitlement Platform." desc = "register"
449,219
def do_set_property(self, property, value): """ called to set the date property for rendering in a cell. we convert to display in the user's locale, then pass on to the cell renderer. """
def do_set_property(self, property, value): """ called to set the date property for rendering in a cell. we convert to display in the user's locale, then pass on to the cell renderer. """
449,220
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
449,221
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
449,222
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
449,223
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
def populateProductDialog(self): self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): if product[1] in ["Expired", "Not Su...
449,224
def __init__(self, name="cli", usage=None, shortdesc=None, description=None): self.shortdesc = shortdesc if shortdesc is not None and description is None: description = shortdesc self.debug = 0 self.parser = OptionParser(usage=usage, description=description) self._add_common_options() self.name = name if ConsumerIdenti...
def __init__(self, name="cli", usage=None, shortdesc=None, description=None): self.shortdesc = shortdesc if shortdesc is not None and description is None: description = shortdesc self.debug = 0 self.parser = OptionParser(usage=usage, description=description) self._add_common_options() self.name = name if ConsumerIdenti...
449,225
def reload_cp_with_certs(self): cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() self.cp = connection.UEPConnection(host=cfg['hostname'] or "localhost", ssl_port=cfg['port'], handler="/candlepin", cert_file=cert_file, key_file=key_file)
def reload_cp_with_certs(self): cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() self.cp = connection.UEPConnection(host=cfg['hostname'] or "localhost", ssl_port=cfg['port'], handler="/candlepin", cert_file=cert_file, key_file=key_file)
449,226
def _do_command(self): """ Executes the command. """ self._validate_options()
def _do_command(self): """ Executes the command. """ self._validate_options()
449,227
def read(cls): self.__mkdir() f = open(self.keypath()) key = f.read() f.close() f = open(self.certpath()) cert = f.read() f.close() return ConsumerIdentity(key, cert)
def read(cls): f = open(cls.keypath()) key = f.read() f.close() f = open(self.certpath()) cert = f.read() f.close() return ConsumerIdentity(key, cert)
449,228
def read(cls): self.__mkdir() f = open(self.keypath()) key = f.read() f.close() f = open(self.certpath()) cert = f.read() f.close() return ConsumerIdentity(key, cert)
def read(cls): self.__mkdir() f = open(self.keypath()) key = f.read() f.close() f = open(cls.certpath()) cert = f.read() f.close() return ConsumerIdentity(key, cert)
449,229
def _get_noncompliant_date(self): """ Returns a datetime object for the non-compliant date to use based on current state of the GUI controls. """ if self.first_noncompliant_radiobutton.get_active(): return self.last_compliant_date else: # Need to convert to a datetime: d = self.date_picker.date return datetime(d.year, ...
def _get_noncompliant_date(self): """ Returns a datetime object for the non-compliant date to use based on current state of the GUI controls. """ if self.first_noncompliant_radiobutton.get_active(): return self.last_compliant_date else: # Need to convert to a datetime: d = self.date_picker.date return datetime(d.year, ...
449,230
def __str__(self): s = [] s.append(Certificate.__str__(self)) s.append(str(self.getProduct())) s.append('') for e in self.getEntitlements(): s.append(str(e)) s.append('') return '\n'.join(s)
def __str__(self): s = [] s.append(Certificate.__str__(self)) s.append(str(self.getProduct())) s.append('') return '\n'.join(s)
449,231
def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("label_status1") #consumer = get_consumer() subscribed_count = 0 #my_model = self.tv_products.get_model() #my_model = self.other_tv.get_model() my_model = self.match_tv.get_model() pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please ...
def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("label_status1") #consumer = get_consumer() subscribed_count = 0 #my_model = self.tv_products.get_model() #my_model = self.other_tv.get_model() my_model = self.match_tv.get_model() pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please ...
449,232
def __init__(self): Lock.__init__(self, self.PATH)
def __init__(self): Lock.__init__(self, self.PATH)
449,233
def perform(self, *serialNumbers): for sn in serialNumbers: cert = self.entdir.find(sn) if cert is None: continue cert.delete() return self
def perform(self, *serialNumbers): for sn in serialNumbers: cert = self.entdir.find(sn) if cert is None: continue cert.delete() return self
449,234
def mayLinger(self, cert): valid = cert.validRange() end = valid.end() graceperoid = end+self.LINGER return ( dt.utcnow() < graceperoid )
def mayLinger(self, cert): valid = cert.validRange() end = valid.end() graceperoid = end+self.LINGER return ( dt.utcnow() < graceperoid )
449,235
def _do_command(self):
def _do_command(self):
449,236
def __write(self, bundle): path = self.entdir.keypath() f = open(path, 'w') f.write(bundle['key']) f.close() cert = ProductCertificate(bundle['certificate']) product = cert.getProduct() path = self.entdir.productpath() fn = self.__ufn(path, product) path = os.path.join(path, fn) f = open(path) f.write(bundle.cert) f.cl...
def __write(self, bundle): path = self.entdir.keypath() f = open(path, 'w') f.write(keypem) f.close() cert = ProductCertificate(crtpem) product = cert.getProduct() path = self.entdir.productpath() fn = self.__ufn(path, product) path = os.path.join(path, fn) f = open(path) f.write(bundle.cert) f.close()
449,237
def __write(self, bundle): path = self.entdir.keypath() f = open(path, 'w') f.write(bundle['key']) f.close() cert = ProductCertificate(bundle['certificate']) product = cert.getProduct() path = self.entdir.productpath() fn = self.__ufn(path, product) path = os.path.join(path, fn) f = open(path) f.write(bundle.cert) f.cl...
def __write(self, bundle): path = self.entdir.keypath() f = open(path, 'w') f.write(bundle['key']) f.close() cert = ProductCertificate(bundle['certificate']) product = cert.getProduct() path = self.entdir.productpath() fn = self.__ufn(path, product) path = os.path.join(path, fn) f = open(path, 'w') f.write(crtpem) f.cl...
449,238
def syncCertificates(self, serialnumbers): reply = [] for sn in serialnumbers: d = {} d['serialNumber'] = sn d['status'] = 'VALID' reply.append(d) return reply
def syncCertificates(self, serialnumbers): reply = [] for sn in serialnumbers: d = {} d['serialNumber'] = sn d['status'] = 'NEW' d['certificate'] = \ {'key':open('/home/jortel/x509/client.key').read(), 'certificate':open('/home/jortel/x509/client.pem').read()} reply.append(d) return reply
449,239
def write(self, path): f = open(path, 'w') f.write(self.join()) f.close() return self
def write(self, path): f = open(path, 'w') f.write(self.join()) f.close() return self
449,240
def createSubscriptionsTreeview(self, treeview, subscriptions, toggle_callback): """ populate subscriptions compatible with your system facts """ treeview.set_model(subscriptions)
def createSubscriptionsTreeview(self, treeview, subscriptions, toggle_callback): """ populate subscriptions compatible with your system facts """ treeview.set_model(subscriptions)
449,241
def __init__(self, host=config['hostname'] or 'localhost',\ ssl_port=config['port'] or 8443, \ handler=config['prefix'] or "/candlepin",\ cert_file=None, key_file=None): self.host = host self.ssl_port = ssl_port
def __init__(self, host=config['hostname'] or 'localhost',\ ssl_port=config['port'] or 8443, \ handler=config['prefix'] or "/candlepin",\ cert_file=None, key_file=None): self.host = host self.ssl_port = ssl_port
449,242
def __init__(self, host=config['hostname'] or 'localhost',\ ssl_port=config['port'] or 8443, \ handler=config['prefix'] or "/candlepin",\ cert_file=None, key_file=None): self.host = host self.ssl_port = ssl_port
def__init__(self,host=config['hostname']or'localhost',\ssl_port=config['port']or8443,\handler=config['prefix']or"/candlepin",\cert_file=None,key_file=None):self.host=hostself.ssl_port=ssl_port
449,243
def abs(cls, path): if os.path.isabs(path): return os.path.join(cls.ROOT, path[1:] else: return os.path.join(cls.ROOT, path)
def abs(cls, path): if os.path.isabs(path): return os.path.join(cls.ROOT, path[1:]) else: return os.path.join(cls.ROOT, path)
449,244
def __init__(self): self.facts = {} self.fact_cache = "/var/lib/rhsm/facts/facts.json"
def __init__(self): self.facts = {} self.fact_cache = "/var/lib/rhsm/facts/facts.json"
449,245
def read(self, path="/var/lib/rhsm/facts/facts.json"): cached_facts = {} try: f = open(path) json_buffer = f.read() cached_facts = json.loads(json_buffer) except IOError, e: print e
def read(self, path="/var/lib/rhsm/facts/facts.json"): cached_facts = {} try: f = open(path) json_buffer = f.read() cached_facts = json.loads(json_buffer) except IOError, e: print e
449,246
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() busted_subs = [] for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['...
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() busted_subs = [] for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: ent_ret = UEP.bindByProduct(consumer['uuid']...
449,247
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() busted_subs = [] for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['...
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() busted_subs = [] for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['...
449,248
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() busted_subs = [] for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['...
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() busted_subs = [] for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['...
449,249
def main(): global gui signal.signal(signal.SIGINT, signal.SIG_DFL) if os.geteuid() != 0 : #rootWarning() sys.exit(1) gui = ManageSubscriptionPage() gtk.main() print "main done"
def main(): global gui signal.signal(signal.SIGINT, signal.SIG_DFL) if os.geteuid() != 0 : #rootWarning() sys.exit(1) gui = ManageSubscriptionPage() gtk.main()
449,250
def populateProductDialog(self): self.productList = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.warn_count = 0 for product in managerlib.getInstalledProductStatus(): self.productList.append(product) if product[1] in ["Expired", "Not Subscribed"]: self.warn_count += 1 self.tv_produc...
defpopulateProductDialog(self):self.productList=gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING)self.warn_count=0forproductinmanagerlib.getInstalledProductStatus():self.productList.append(product)ifproduct[1]in["Expired","NotSubscribed"]:self.warn_count+=1self.tv_products=self.subsxml.get_widg...
449,251
def updateMessage(self): self.sumlabel = self.subsxml.get_widget("summaryLabel1") if self.warn_count: self.sumlabel.set_label(_("<b>%s products or subscriptions need your attention.\n</b>Add or Update subscriptions for products you are using.\n" % self.warn_count)) else: self.sumlabel.set_label(_("Add or Update subscri...
def updateMessage(self): self.sumlabel = self.subsxml.get_widget("summaryLabel1") if self.warn_count: self.sumlabel.set_label(_("<b>%s products or subscriptions need your attention.\n\n</b>Add or Update subscriptions for products you are using.\n" % self.warn_count)) else: self.sumlabel.set_label(_("Add or Update subsc...
449,252
def populateAvailableList(self): consumer = managerlib.check_registration() self.availableList = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for product in managerlib.getAvailableEntitlements(UEP, consumer): self.availableList.append(None, [False] + product.values(...
def populateAvailableList(self): consumer = managerlib.check_registration() self.availableList = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for product in managerlib.getAvailableEntitlements(UEP, consumer): self.availableList.append(None, [False] + product.values(...
449,253
def populateAvailableList(self): consumer = managerlib.check_registration() self.availableList = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for product in managerlib.getAvailableEntitlements(UEP, consumer): self.availableList.append(None, [False] + product.values(...
def populateAvailableList(self): consumer = managerlib.check_registration() self.availableList = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for product in managerlib.getAvailableEntitlements(UEP, consumer): self.availableList.append(None, [False] + product.values(...
449,254
def _do_command(self): """ Executes the command. """ self._validate_options()
def _do_command(self): """ Executes the command. """ self._validate_options()
449,255
def _do_command(self): """ Executes the command. """ self._validate_options()
def _do_command(self): """ Executes the command. """ self._validate_options()
449,256
def __str__(self): s = [] s.append('Product {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArchitecture()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tQuantity = %s' % self.getQuantity()) s.append('\tSubtype = %...
def __str__(self): s = [] s.append('Product {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArch()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tQuantity = %s' % self.getQuantity()) s.append('\tSubtype = %s' % sel...
449,257
def __str__(self): s = [] s.append('Product {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArchitecture()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tQuantity = %s' % self.getQuantity()) s.append('\tSubtype = %...
def __str__(self): s = [] s.append('Product {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArchitecture()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tQuantity = %s' % self.getQuantity()) s.append('\tSubtype = %...
449,258
def __str__(self): s = [] s.append('Entitlement {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArchitecture()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tGuest Quantity = %s' % self.getGuestQuantity()) s.append...
def __str__(self): s = [] s.append('Entitlement {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArch()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tGuest Quantity = %s' % self.getGuestQuantity()) s.append('\tQuan...
449,259
def _do_command(self):
def _do_command(self):
449,260
def _do_command(self): """ Executes the command. """ self._validate_options()
def _do_command(self): """ Executes the command. """ self._validate_options()
449,261
def getLocal(self, report): local = {} for valid in self.entdir.listValid(): sn = valid.serialNumber() report.valid.append(sn) local[sn] = valid return local
def getLocal(self, report): local = {} for valid in self.entdir.listValid(grace_period=True): sn = valid.serialNumber() report.valid.append(sn) local[sn] = valid return local
449,262
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['uuid'], product)[...
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['uuid'], product)[...
449,263
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['uuid'], product)[...
def onSubscribeAction(self, button): slabel = self.addxml.get_widget("label_status") #consumer = get_consumer() subscribed_count = 0 my_model = self.tv_products.get_model() for product, state in self.selected.items(): # state = (bool, iter) if state[0]: try: entitled_data = UEP.bindByProduct(consumer['uuid'], product)[...
449,264
def dst(self, dt): return 0
def dst(self, dt): return 0
449,265
def getRegnum(self): return self.ext.get('4')
def getSubscription(self): return self.ext.get('4')
449,266
def __str__(self): s = [] s.append('Order {') s.append('\tName ...... = %s' % self.getName()) s.append('\tNumber .... = %s' % self.getNumber()) s.append('\tSKU ....... = %s' % self.getSku()) s.append('\tRegnum .... = %s' % self.getRegnum()) s.append('\tQuantity .. = %s' % self.getQuantity()) s.append('}') return '\n'.j...
def __str__(self): s = [] s.append('Order {') s.append('\tName .......... = %s' % self.getName()) s.append('\tNumber ........ = %s' % self.getNumber()) s.append('\tSKU ........... = %s' % self.getSku()) s.append('\tSubscription .. = %s' % self.getSubscription()) s.append('\tQuantity ...... = %s' % self.getQuantity()) s...
449,267
def _do_command(self): """ Executes the command. """ self._validate_options() consumer = check_registration()['uuid'] if not (self.options.available or self.options.consumed): iproducts = managerlib.getInstalledProductStatus() if not len(iproducts): print("No installed Products to list") sys.exit(0) print """+--------...
def _do_command(self): """ Executes the command. """ self._validate_options() consumer = check_registration()['uuid'] if not (self.options.available or self.options.consumed): iproducts = managerlib.getInstalledProductStatus() if not len(iproducts): print("No installed Products to list") sys.exit(0) print """+--------...
449,268
def main(self): if len(sys.argv) < 2 or not self._find_best_match(sys.argv): self._usage() sys.exit(1)
def main(self): if len(sys.argv) < 2 or not self._find_best_match(sys.argv): self._usage() sys.exit(1)
449,269
def main(self): if len(sys.argv) < 2 or not self._find_best_match(sys.argv): self._usage() sys.exit(1)
def main(self): if len(sys.argv) < 2 or not self._find_best_match(sys.argv): self._usage() sys.exit(1)
449,270
def _show_buttons(self): """ Renders the Tools buttons dynamically. """ log.debug("Showing buttons.") self.button_bar.foreach(lambda widget: self.button_bar.remove(widget)) registered = self.registered() if not registered: self._show_register_button() else: self._show_add_sub_button()
def _show_buttons(self): """ Renders the Tools buttons dynamically. """ log.debug("Showing buttons.") self.button_bar.foreach(lambda widget: self.button_bar.remove(widget)) registered = self.registered() if not registered: self._show_register_button() else: self._show_add_sub_button()
449,271
def _show_buttons(self): """ Renders the Tools buttons dynamically. """ log.debug("Showing buttons.") self.button_bar.foreach(lambda widget: self.button_bar.remove(widget)) registered = self.registered() if not registered: self._show_register_button() else: self._show_add_sub_button()
def _show_buttons(self): """ Renders the Tools buttons dynamically. """ log.debug("Showing buttons.") self.button_bar.foreach(lambda widget: self.button_bar.remove(widget)) registered = self.registered() if not registered: self._show_register_button() else: self._show_add_sub_button()
449,272
def getPoolsList(self, consumerId, listAll=False): method = "/pools?consumer=%s" % consumerId if listAll: method = "%s?listall=true" % method results = self.conn.request_get(method) return results
def getPoolsList(self, consumerId, listAll=False): method = "/pools?consumer=%s" % consumerId if listAll: method = "%s&listall=true" % method results = self.conn.request_get(method) return results
449,273
def updateSubButtonAction(self, button): UpdateSubscriptionScreen(self.pname_selected)
def updateSubButtonAction(self, button): UpdateSubscriptionScreen(self.pname_selected)
449,274
def __init__(self, selected_callback, cancel_callback): self._selected_callback = selected_callback self._cancel_callback = cancel_callback self.total_contracts = 0 self.contract_selection_xml = gtk.glade.XML(CONTRACT_SELECTION_GLADE) self.contract_selection_win = self.contract_selection_xml.get_widget( "contract_selec...
def __init__(self, selected_callback, cancel_callback): self._selected_callback = selected_callback self._cancel_callback = cancel_callback self.total_contracts = 0 self.contract_selection_xml = gtk.glade.XML(CONTRACT_SELECTION_GLADE) self.contract_selection_win = self.contract_selection_xml.get_widget( "contract_selec...
449,275
def _subscribe_button_clicked(self, button): self._selected_callback( self.model[self.contract_selection_treeview.get_cursor()[0][0]][5])
def _subscribe_button_clicked(self, button): self._selected_callback( self.model[self.contract_selection_treeview.get_cursor()[0][0]][5])
449,276
def _get_noncompliant_date(self): """ Returns a datetime object for the non-compliant date to use based on current state of the GUI controls. """ if self.first_noncompliant_radiobutton.get_active(): return self.last_compliant_date else: return self.date_picker.date
def _get_noncompliant_date(self): """ Returns a datetime object for the non-compliant date to use based on current state of the GUI controls. """ if self.first_noncompliant_radiobutton.get_active(): return self.last_compliant_date else: return self.date_picker.date
449,277
def _display_uncompliant(self): sorter = CertSorter(self.product_dir, self.entitlement_dir, on_date=self.last_compliant_date)
def _display_uncompliant(self): sorter = CertSorter(self.product_dir, self.entitlement_dir, on_date=self.last_compliant_date)
449,278
def endheaders(self, body=None): if not self._proxy_auth: self._proxy_auth = self._encode_auth()
def endheaders(self, body=None): if not self._proxy_auth: self._proxy_auth = self._encode_auth()
449,279
def __init__(self, backend, consumer, facts): self.backend = backend self.consumer = consumer self.facts = facts self.pool_stash = managerlib.PoolStash(self.backend, self.consumer, self.facts)
def __init__(self, backend, consumer, facts): self.backend = backend self.consumer = consumer self.facts = facts self.pool_stash = managerlib.PoolStash(self.backend, self.consumer, self.facts)
449,280
def __init__(self, backend, consumer, facts): self.backend = backend self.consumer = consumer self.facts = facts self.pool_stash = managerlib.PoolStash(self.backend, self.consumer, self.facts)
def__init__(self,backend,consumer,facts):self.backend=backendself.consumer=consumerself.facts=factsself.pool_stash=managerlib.PoolStash(self.backend,self.consumer,self.facts)
449,281
def __init__(self, backend, consumer, facts): self.backend = backend self.consumer = consumer self.facts = facts self.pool_stash = managerlib.PoolStash(self.backend, self.consumer, self.facts)
def__init__(self,backend,consumer,facts):self.backend=backendself.consumer=consumerself.facts=factsself.pool_stash=managerlib.PoolStash(self.backend,self.consumer,self.facts)
449,282
def populateSubscriptionLists(self): try: compatible = managerlib.getAvailableEntitlements(UEP, self.consumer.uuid, self.facts) pool_filter = managerlib.PoolFilter() self.matched = pool_filter.filter_uninstalled(compatible) matched_pids = [] for product in self.matched: pdata = [product['productName'], product['quantit...
def populateSubscriptionLists(self): try: compatible = managerlib.getAvailableEntitlements(UEP, self.consumer.uuid, self.facts) pool_filter = managerlib.PoolFilter() self.matched = pool_filter.filter_uninstalled(compatible) matched_pids = [] for product in self.matched: pdata = [product['productName'], product['quantit...
449,283
def register(self, testing=None): self.uname = registration_xml.get_widget("account_login") self.passwd = registration_xml.get_widget("account_password") self.consumer_name = registration_xml.get_widget("consumer_name")
def register(self, testing=None): self.uname = registration_xml.get_widget("account_login") self.passwd = registration_xml.get_widget("account_password") self.consumer_name = registration_xml.get_widget("consumer_name")
449,284
def main(self):
def main(self):
449,285
def delete_event(self, event, data=None): return self.finish()
def delete_event(self, event, data=None): return self.finish()
449,286
def cancel(self, button): self.addWin.hide() print 'subscribe window hiding'
def cancel(self, button): self.addWin.hide() print 'subscribe window hiding'
449,287
def onSubscribeAction(self, button): print "onSubscribeAction" print logutil.trace_me() slabel = rhsm_xml.get_widget("label_status1") #consumer = get_consumer() subscribed_count = 0 #my_model = self.tv_products.get_model() #my_model = self.other_tv.get_model() my_model = self.match_tv.get_model() pwin = progress.Progre...
def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("label_status1") #consumer = get_consumer() subscribed_count = 0 #my_model = self.tv_products.get_model() #my_model = self.other_tv.get_model() my_model = self.match_tv.get_model() pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please ...
449,288
def __init__(self, host, ssl_port, apihandler, cert_file=None, key_file=None, ca_file=None, insecure=False): print "Restlib.init" print "cert_file", cert_file self.host = host self.ssl_port = ssl_port self.apihandler = apihandler self.headers = {"Content-type":"application/json", "Accept": "application/json", "Accept-L...
def __init__(self, host, ssl_port, apihandler, cert_file=None, key_file=None, ca_file=None, insecure=False): self.host = host self.ssl_port = ssl_port self.apihandler = apihandler self.headers = {"Content-type":"application/json", "Accept": "application/json", "Accept-Language": locale.getdefaultlocale()[0].lower().rep...
449,289
def _request(self, request_type, method, info=None): handler = self.apihandler + method context = SSL.Context("sslv3") if self.ca_file != None: log.info('loading ca_file located at: %s', self.ca_file) context.load_verify_locations(self.ca_file) log.info('work in insecure mode ?:%s', self.insecure) if not self.insecure:...
def _request(self, request_type, method, info=None): handler = self.apihandler + method context = SSL.Context("sslv3") if self.ca_file != None: log.info('loading ca_file located at: %s', self.ca_file) context.load_verify_locations(self.ca_file) log.info('work in insecure mode ?:%s', self.insecure) if not self.insecure:...
449,290
def __init__(self, host='localhost', ssl_port=8443, handler="/candlepin", cert_file=None, key_file=None): self.host = host self.ssl_port = ssl_port self.handler = handler self.conn = None self.basic_auth_conn = None self.cert_file = cert_file self.key_file = key_file config = initConfig() self.candlepin_ca_file = confi...
def __init__(self, host='localhost', ssl_port=8443, handler="/candlepin", cert_file=None, key_file=None): self.host = host self.ssl_port = ssl_port self.handler = handler self.conn = None self.basic_auth_conn = None self.cert_file = cert_file self.key_file = key_file config = initConfig() self.candlepin_ca_file = confi...
449,291
def unBindBySerialNumber(self, consumerId, serial): method = "/consumers/%s/certificates/%s" % (consumerId, serial) print method return self.conn.request_delete(method)
def unBindBySerialNumber(self, consumerId, serial): method = "/consumers/%s/certificates/%s" % (consumerId, serial) return self.conn.request_delete(method)
449,292
def getPoolsList(self, consumerId): method = "/pools?consumer=%s" % consumerId print "getPoolsList" print self.conn print self.conn.cert_file
def getPoolsList(self, consumerId): method = "/pools?consumer=%s" % consumerId print "getPoolsList" print self.conn print self.conn.cert_file
449,293
def __str__(self): return 'customer: "%s", user: "%s", consumer (uuid): %s' % \ (self.getCustomerName(), self.getUser(), self.getConsumerId())
def __str__(self): return 'customer: "%s", user: "%s", consumer (uuid): %s' % \ (self.getCustomerName(), self.getUser(), self.getConsumerId())
449,294
def populateProductDialog(self): state_icon_map = {"Expired" : gtk.STOCK_DIALOG_WARNING, "Not Subscribed" : gtk.STOCK_DIALOG_QUESTION, "Subscribed" : gtk.STOCK_APPLY, } self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRI...
def populateProductDialog(self): state_icon_map = {"Expired" : gtk.STOCK_DIALOG_WARNING, "Not Subscribed" : gtk.STOCK_DIALOG_QUESTION, "Subscribed" : gtk.STOCK_APPLY, } self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRI...
449,295
def populateProductDialog(self): state_icon_map = {"Expired" : gtk.STOCK_DIALOG_WARNING, "Not Subscribed" : gtk.STOCK_DIALOG_QUESTION, "Subscribed" : gtk.STOCK_APPLY, } self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRI...
def populateProductDialog(self): state_icon_map = {"Expired" : gtk.STOCK_DIALOG_WARNING, "Not Subscribed" : gtk.STOCK_DIALOG_QUESTION, "Subscribed" : gtk.STOCK_APPLY, } self.tv_products = self.subsxml.get_widget("treeview_updates") self.productList = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRI...
449,296
def setAccountMsg(self): euser = consumer['user_account'] or None alabel = self.regtokenxml.get_widget("account_label") alabel.set_label(_("\nThis system is registered with the account <b>%s</b>\n\n<b>UID:</b> %s" % (euser, consumer['uuid'])))
def setAccountMsg(self): euser = consumer['user_account'] or None alabel = self.regtokenxml.get_widget("account_label") alabel.set_label(_("\nThis system is registered with the account <b>%s</b>\n\n<b>UID:</b> %s" % (euser, consumer['uuid'])))
449,297
def createScreen(self): self.vbox = gtk.VBox(spacing=10) self._get_widget("main_vbox").reparent(self.vbox)
def createScreen(self): self.vbox = gtk.VBox(spacing=10) self._get_widget("main_vbox").reparent(self.vbox)
449,298
def installed_products_without_entitlements(self): installed_products_no_entitlements = [] for product_cert in self.product_directory.list(): if not self.entitlement_directory.findByProduct( product_cert.getProduct().getHash()): installed_products_no_entitlements.append(product_cert) return installed_products_no_entitl...
def installed_products_without_entitlements(self): installed_products_no_entitlements = [] for product_cert in self.product_directory.list(): if not self.entitlement_directory.findByProduct( product_cert.getProduct().getHash()): installed_products_no_entitlements.append(product_cert) return installed_products_no_entitl...
449,299