bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self): self.product_directory = ProductDirectory() self.entitlement_directory = EntitlementDirectory() | def __init__(self): self.product_directory = ProductDirectory() self.entitlement_directory = EntitlementDirectory() | 449,300 |
def filter_entitlements_by_products(self, products): matched_data_dict = {} for c in self.entitlement_directory.list(): print "cert", c for product in products: productid = product.getProduct().getHash() print productid, c.getProduct().getHash() if productid == c.getProduct().getHash(): matched_data_dict[c.serialNumber... | def filter_entitlements_by_products(self, products): matched_data_dict = {} for c in self.entitlement_directory.list(): for product in products: productid = product.getProduct().getHash() print productid, c.getProduct().getHash() if productid == c.getProduct().getHash(): matched_data_dict[c.serialNumber()] = c return m... | 449,301 |
def filter_entitlements_by_products(self, products): matched_data_dict = {} for c in self.entitlement_directory.list(): print "cert", c for product in products: productid = product.getProduct().getHash() print productid, c.getProduct().getHash() if productid == c.getProduct().getHash(): matched_data_dict[c.serialNumber... | def filter_entitlements_by_products(self, products): matched_data_dict = {} for c in self.entitlement_directory.list(): print "cert", c for product in products: productid = product.getProduct().getHash() if productid == c.getProduct().getHash(): matched_data_dict[c.serialNumber()] = c return matched_data_dict | 449,302 |
def filter_pools_by_products(self, pools, products): """ Filter a list of pools and return just those that have the products in the list of products and returns those pools """ matched_data_dict = {} for d in pools: print "pool", d for product in products: productid = product.getProduct().getHash() if productid == d['p... | def filter_pools_by_products(self, pools, products): """ Filter a list of pools and return just those that have the products in the list of products and returns those pools """ matched_data_dict = {} for d in pools: for product in products: productid = product.getProduct().getHash() if productid == d['productId']: matc... | 449,303 |
def get_active_on_date(self): """ Returns a date for the "active on" field. """ year = self.year_entry.get_text() month = self.month_entry.get_text() day = self.day.get_text() | def get_active_on_date(self): """ Returns a date for the "active on" field. """ year = self.year_entry.get_text() month = self.month_entry.get_text() day = self.day.get_text() | 449,304 |
def unregister(uep, consumer_uuid, force=True): """ Shared logic for un-registration. If an unregistration fails, we always clean up locally, but allow the exception to be thrown so the caller can decide how to handle it. """ try: uep.unregisterConsumer(consumer_uuid) finally: if force: # Clean up certificates, these ... | def unregister(uep, consumer_uuid, force=True): """ Shared logic for un-registration. If an unregistration fails, we always clean up locally, but allow the exception to be thrown so the caller can decide how to handle it. """ try: uep.unregisterConsumer(consumer_uuid) finally: if force: # Clean up certificates, these ... | 449,305 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,306 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,307 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,308 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,309 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,310 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,311 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,312 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,313 |
def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | def __init__(self, backend, consumer, facts): widgets = ['product_text', 'compliance_text', 'subscription_text'] super(InstalledProductsTab, self).__init__('installed.glade', widgets) self.product_dir = ProductDirectory() self.entitlement_dir = EntitlementDirectory() # Product column text_renderer = gtk.CellRenderer... | 449,314 |
def on_product_change(filemonitor, first_file, other_file, event_type): self.update_products() | def on_product_change(filemonitor, first_file, other_file, event_type): self.update_products() | 449,315 |
def on_product_change(filemonitor, first_file, other_file, event_type): self.update_products() | def on_product_change(filemonitor, first_file, other_file, event_type): self.update_products() | 449,316 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,317 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,318 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,319 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,320 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,321 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,322 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,323 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,324 |
def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | def update_products(self): self.store.clear() for product_cert in self.product_dir.list(): for product in product_cert.getProducts(): product_hash = product.getHash() entitlement_cert = self.entitlement_dir.findByProduct(product_hash) entry = {} entry['product'] = product.getName() entry['version'] = product.getVersi... | 449,325 |
def _render_icon(self, icon_id): return self.content.render_icon(icon_id, gtk.ICON_SIZE_MENU) | def _render_icon(self, icon_id): return self.content.render_icon(icon_id, gtk.ICON_SIZE_MENU) | 449,326 |
def on_selection(self, selection): # Load the entitlement certificate for the selected row: product = selection['product'] self.product_text.get_buffer().set_text(product) compliance = selection['compliance_note'] self.compliance_text.get_buffer().set_text(compliance) subscription = selection['subscription'] or '' se... | def on_selection(self, selection): # Load the entitlement certificate for the selected row: product = selection['product'] self.product_text.get_buffer().set_text(product) compliance = selection['compliance_note'] self.compliance_text.get_buffer().set_text(compliance) subscription = selection['subscription'] or '' se... | 449,327 |
def on_selection(self, selection): # Load the entitlement certificate for the selected row: product = selection['product'] self.product_text.get_buffer().set_text(product) compliance = selection['compliance_note'] self.compliance_text.get_buffer().set_text(compliance) subscription = selection['subscription'] or '' se... | def on_selection(self, selection): # Load the entitlement certificate for the selected row: product = selection['product'] self.product_text.get_buffer().set_text(product) compliance = selection['compliance_note'] self.compliance_text.get_buffer().set_text(compliance) subscription = selection['subscription'] or '' se... | 449,328 |
def get_type_map(self): return { 'image': gtk.gdk.Pixbuf, 'product': str, 'version': str, 'status': str, 'compliance_note': str, 'contract': str, 'subscription': str, 'start_date': str, 'expiration_date': str, 'serial': str, 'align': float, 'background': str } | def get_type_map(self): return { 'image': gtk.gdk.Pixbuf, 'product': str, 'version': str, 'status': str, 'compliance_note': str, 'contract': str, 'subscription': str, 'start_date': str, 'expiration_date': str, 'serial': str, 'align': float, 'background': str } | 449,329 |
def getMemInfo(self): self.meminfo = {} try: parser = re.compile(r'^(?P<key>\S*):\s*(?P<value>\d*)\s*kB' ) memdata = open('/proc/meminfo') for info in memdata: match = parser.match(info) if not match: continue key, value = match.groups(['key', 'value']) self.meminfo["memory."+key.lower().replace(" ", "_")] = \ "%s" % i... | def getMemInfo(self): self.meminfo = {} try: parser = re.compile(r'^(?P<key>\S*):\s*(?P<value>\d*)\s*kB' ) memdata = open('/proc/meminfo') for info in memdata: match = parser.match(info) if not match: continue key, value = match.groups(['key', 'value']) nkey = '.'.join(["memory", key.lower()]) self.meminfo[nkey] = "%s"... | 449,330 |
def _get_dmi_data(self, func, tag, ddict): for key, value in func.items(): for key1, value1 in value['data'].items(): if not isinstance(value1, str): continue ddict[tag+key1.lower().replace(" ", "_")] = str(value1) | def _get_dmi_data(self, func, tag, ddict): for key, value in func.items(): for key1, value1 in value['data'].items(): if not isinstance(value1, str): continue ddict[tag+key1.lower().replace(" ", "_")] = str(value1) | 449,331 |
def abs(cls, path): if os.path.isabs(path): return path 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,332 |
def __init__(self, backend, consumer): self.backend = backend self.consumer = consumer | def __init__(self, backend, consumer): self.backend = backend self.consumer = consumer | 449,333 |
def __init__(self, backend, consumer): self.backend = backend self.consumer = consumer | def__init__(self,backend,consumer):self.backend=backendself.consumer=consumer | 449,334 |
def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | def add_column(name, renderer=text_renderer): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | 449,335 |
def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | 449,336 |
def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | 449,337 |
def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | def add_text_column(name): column_number = len(self.subscription_view.get_columns()) column = gtk.TreeViewColumn(_(name), text_renderer, text=column_number) | 449,338 |
def __init__(self): global UEP self.selected = {} self.addxml = gtk.glade.XML(gladexml, "dialog_add", domain="subscription-manager") self.csstatus = self.addxml.get_widget("select_status") self.total = 0 self.consumer = consumer available_ent = 0 if consumer.has_key('uuid'): self.availableList = gtk.TreeStore(gobject.T... | def __init__(self): global UEP self.selected = {} self.addxml = gtk.glade.XML(gladexml, "dialog_add", domain="subscription-manager") self.csstatus = self.addxml.get_widget("select_status") self.total = 0 self.consumer = consumer available_ent = 0 if consumer.has_key('uuid'): self.availableList = gtk.TreeStore(gobject.T... | 449,339 |
def __init__(self, host, port, ssl_port, apihandler, cert_file=None, key_file=None,): self.host = host self.port = port self.ssl_port = ssl_port self.apihandler = apihandler self.headers = {"Content-type":"application/json", "Accept": "application/json", "Accept-Language": locale.getdefaultlocale()[0]} self.cert_file =... | def __init__(self, host, port, ssl_port, apihandler, cert_file=None, key_file=None,): self.host = host self.port = port self.ssl_port = ssl_port self.apihandler = apihandler self.headers = {"Content-type":"application/json", "Accept": "application/json", "Accept-Language": locale.getdefaultlocale()[0].lower().replace('... | 449,340 |
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 % xml.sax.saxutils.escape(self.pname_selected), self.mainWin) if not dlg.getrc(): return | 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 % xml.sax.saxutils.escape(self.pname_selected), self.mainWin) if not dlg.getrc(): return | 449,341 |
def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("available_subscriptions_label") subscribed_count = 0 pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please wait.")) busted_subs = [] count = 0 | def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("available_subscriptions_label") subscribed_count = 0 pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please wait.")) busted_subs = [] count = 0 | 449,342 |
def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("available_subscriptions_label") subscribed_count = 0 pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please wait.")) busted_subs = [] count = 0 | def onSubscribeAction(self, button): slabel = rhsm_xml.get_widget("available_subscriptions_label") subscribed_count = 0 pwin = progress.Progress() pwin.setLabel(_("Performing Subscribe. Please wait.")) busted_subs = [] count = 0 | 449,343 |
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,344 |
def __init__(self): cfg = initConfig() host = cfg['hostname'] or "localhost" port = cfg['port'] ssl_port = cfg['ssl_port'] cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() UEPConnection.__init__(self, host, port, ssl_port, cert_file=cert_file, key_file=key_file) self.uuid = self.consumerId(... | def __init__(self): cfg = initConfig() host = cfg['hostname'] or "localhost" ssl_port = cfg['port'] cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() UEPConnection.__init__(self, host, port, ssl_port, cert_file=cert_file, key_file=key_file) self.uuid = self.consumerId() | 449,345 |
def __init__(self): cfg = initConfig() host = cfg['hostname'] or "localhost" port = cfg['port'] ssl_port = cfg['ssl_port'] cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() UEPConnection.__init__(self, host, port, ssl_port, cert_file=cert_file, key_file=key_file) self.uuid = self.consumerId(... | def __init__(self): cfg = initConfig() host = cfg['hostname'] or "localhost" port = cfg['port'] ssl_port = cfg['ssl_port'] cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() UEPConnection.__init__(self, host, ssl_port, cert_file=cert_file, key_file=key_file) self.uuid = self.consumerId() | 449,346 |
def __init__(self, backend, consumer, facts): self.backend = backend self.consumer = consumer self.facts = facts | def __init__(self, backend, consumer, facts): self.backend = backend self.consumer = consumer self.facts = facts | 449,347 |
def subscribe_button_clicked(self, button): model, tree_iter = self.subs_treeview.get_selection().get_selected() pools = model.get_value(tree_iter, MERGED_POOLS_INDEX) # Decide if we need to show the contract selection dialog or not. # if there's just one pool, shortcut right to the callback that the # dialog would ha... | def subscribe_button_clicked(self, button): model, tree_iter = self.subs_treeview.get_selection().get_selected() pools = model.get_value(tree_iter, self.subs_store['merged_pools']) # Decide if we need to show the contract selection dialog or not. # if there's just one pool, shortcut right to the callback that the # di... | 449,348 |
def validRange(self): """ Get the I{valid} date range. | def validRange(self): """ Get the I{valid} date range. | 449,349 |
def update_subscriptions(self): entcerts = EntitlementDirectory().list() | def update_subscriptions(self): entcerts = EntitlementDirectory().list() | 449,350 |
def save(self, config_file=None): fo = open(self.config_file, "wb") print "writing to ", self.config_file self.write(fo) | def save(self, config_file=None): fo = open(self.config_file, "wb") self.write(fo) | 449,351 |
def save(self, config_file=None): fo = open(self.config_file, "wb") print "writing to ", self.config_file self.write(fo) | defsave(self,config_file=None):fo=open(self.config_file,"wb")print"writingto",self.config_fileself.write(fo) | 449,352 |
def fetch_certificates(): # Force fetch all certs try: certlib.update() except Exception, e: log.error("Certificate sync failed") log.error(e) return False return True | def fetch_certificates(): # Force fetch all certs try: certlib.update() except Exception, e: log.error("Certificate sync failed") log.error(e) return False return True | 449,353 |
def show_regtoken_screen(): global regtoken_screen if regtoken_screen: regtoken_screen.show() else: regtoken_screen = RegistrationTokenScreen() | def show_regtoken_screen(): global regtoken_screen if regtoken_screen: regtoken_screen.show() else: regtoken_screen = RegistrationTokenScreen() | 449,354 |
def show_add_subscription_screen(): global add_subscription_screen if add_subscription_screen: add_subscription_screen.show() else: add_subscription_screen = AddSubscriptionScreen() | def show_add_subscription_screen(): global add_subscription_screen if add_subscription_screen: add_subscription_screen.show() else: add_subscription_screen = AddSubscriptionScreen() | 449,355 |
def create_gui(self): global UEP | defself.add_subscription_screen = None create_gui(self):self.add_subscription_screen = None globalself.add_subscription_screen = None UEP | 449,356 |
def addSubButtonAction(self, button): print "addSubButtonAction" if consumer.has_key('uuid'): show_add_subscription_screen() else: show_import_certificate_screen() | def addSubButtonAction(self, button): print 'ManageSubscriptionPage.addSubButtonAction() -> show_add_subscription_screen()' if consumer.has_key('uuid'): show_add_subscription_screen() else: show_import_certificate_screen() | 449,357 |
def addSubButtonAction(self, button): print "addSubButtonAction" if consumer.has_key('uuid'): show_add_subscription_screen() else: show_import_certificate_screen() | def addSubButtonAction(self, button): print "addSubButtonAction" if consumer.has_key('uuid'): self.show_add_subscription_screen() else: show_import_certificate_screen() | 449,358 |
def addSubButtonAction(self, button): print "addSubButtonAction" if consumer.has_key('uuid'): show_add_subscription_screen() else: show_import_certificate_screen() | def addSubButtonAction(self, button): print "addSubButtonAction" if consumer.has_key('uuid'): show_add_subscription_screen() else: show_import_certificate_screen() | 449,359 |
def updateProductDialog(self): print "updateProductDialog" self.warn_count = 0 self.productList.clear() for product in managerlib.getInstalledProductStatus(): markup_status = product[1] if product[1] in ["Expired", "Not Subscribed", "Not Installed"]: self.warn_count += 1 markup_status = '<span foreground="red"><b>%s</b... | def updateProductDialog(self): print "[%s] updateProductDialog called" % time.time() self.warn_count = 0 self.productList.clear() for product in managerlib.getInstalledProductStatus(): markup_status = product[1] if product[1] in ["Expired", "Not Subscribed", "Not Installed"]: self.warn_count += 1 markup_status = '<span... | 449,360 |
def gui_reload(self, widget=None): print "gui_reload" print logutil.trace_me_more() self.setRegistrationStatus() self.updateProductDialog() | def gui_reload(self, widget=None): print logutil.trace_me_more() self.setRegistrationStatus() self.updateProductDialog() | 449,361 |
def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer self.available_ent = 0 | defprint "[%s] in AddSubscriptinScreen.__init__" % time.time() __init__(self):print "[%s] in AddSubscriptinScreen.__init__" % time.time() globalprint "[%s] in AddSubscriptinScreen.__init__" % time.time() UEPprint "[%s] in AddSubscriptinScreen.__init__" % time.time() self.selectedprint "[%s] in AddSubscriptinScreen.__in... | 449,362 |
def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer self.available_ent = 0 | def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer self.available_ent = 0 | 449,363 |
def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer self.available_ent = 0 | def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer self.available_ent = 0 | 449,364 |
def cancel(self, button): self.addWin.hide() | defprint 'subscribe window hiding' cancel(self,print 'subscribe window hiding' button):print 'subscribe window hiding' self.addWin.hide() | 449,365 |
def setUp(self): | def setUp(self): | 449,366 |
def check_facts(fact): found_facts[fact[0]] = fact[1] | def check_facts(fact): found_facts[fact[0]] = fact[1] | 449,367 |
def get_facts(self): if self.facts: # see bz #627707 # there is a little bit of a race between when we load the facts, and when # we decide to save them, so delete facts out from under a Fact object means # it wasn't detecting it missing in that case and not writing a new one self.write(facts) return self.facts self.fa... | def get_facts(self): if self.facts: # see bz #627707 # there is a little bit of a race between when we load the facts, and when # we decide to save them, so delete facts out from under a Fact object means # it wasn't detecting it missing in that case and not writing a new one self.write(self.facts) return self.facts se... | 449,368 |
def __authenticate(self, username, password): encoded = base64.encodestring(':'.join((username,password))) basic = 'Basic %s' % encoded[:-1] self.conn.headers['Authorization'] = basic return self.conn.headers | def __authenticate(self, username, password): encoded = base64.encodestring(':'.join((username,password))) basic = 'Basic %s' % encoded[:-1] self.conn.headers['Authorization'] = basic return self.conn.headers | 449,369 |
def registerConsumer(self, username, password, name="unknown", type="system", facts={}): """ Creates a consumer on candlepin server """ params = { "type": type, "name": name, "facts": facts } self.__authenticate(username, password) return self.conn.request_post('/consumers/', params) | def registerConsumer(self, username, password, name="unknown", type="system", facts={}): """ Creates a consumer on candlepin server """ params = { "type": type, "name": name, "facts": facts } self.__authenticate(username, password) return self.conn.request_post('/consumers/', params) | 449,370 |
def __init__(self, host=config.get('server', 'hostname', 'localhost'), ssl_port=int(config.get('server', 'port', 8443)), handler=config.get('server', 'prefix', '/candlepin'), cert_file=None, key_file=None): | def __init__(self, host=config.get('server', 'hostname', 'localhost'), ssl_port=int(config.get('server', 'port', 8443)), handler=config.get('server', 'prefix', '/candlepin'), cert_file=None, key_file=None): | 449,371 |
def get_date(sub): return sub.validRange().end() | def get_date(sub): return sub.validRange().end() | 449,372 |
def update(self): repod = RepoFile() repod.read() valid = set() updates = 0 bundles = self.bundles() for cont in self.content(bundles): name = cont.id valid.add(name) existing = repod[name] if existing is None: updates += 1 repod[name] = cont continue updates += existing.update(cont) delete = [] for name in repod.secti... | def update(self): repod = RepoFile() repod.read() valid = set() updates = 0 bundles = self.bundles() for cont in self.content(bundles): name = cont.id valid.add(name) existing = repod[name] if existing is None: updates += 1 repod[name] = cont continue updates += existing.update(cont) delete = [] for name in repod.secti... | 449,373 |
def bundles(self): bundles = [] for b in CertDirectory().bundles(): bundles.append(b) return bundles | def bundles(self): bundles = [] for b in CertDirectory().bundles(): bundles.append(b) return bundles | 449,374 |
def create_gui(self): global UEP | def create_gui(self): global UEP | 449,375 |
def create_gui(self): global UEP | def create_gui(self): global UEP | 449,376 |
def addSubButtonAction(self, button): AddSubscriptionScreen() self.gui_reload() | def addSubButtonAction(self, button): show_add_subscription_screen() self.gui_reload() | 449,377 |
def __init__(self): create_and_set_basic_connection() dic = { "on_close_clicked" : self.cancel, "on_register_button_clicked" : self.onRegisterAction, } rhsm_xml.signal_autoconnect(dic) self.registerWin = rhsm_xml.get_widget("register_dialog") self.registerWin.connect("hide", self.cancel) self.initializeConsumerName() | def __init__(self): create_and_set_basic_connection() dic = { "on_register_close_clicked" : self.cancel, "on_register_button_clicked" : self.onRegisterAction, } rhsm_xml.signal_autoconnect(dic) self.registerWin = rhsm_xml.get_widget("register_dialog") self.registerWin.connect("hide", self.cancel) self.initializeConsume... | 449,378 |
def __init__(self): dic = { "on_close_clicked" : self.finish, "on_change_account_button" : self.reRegisterAction, "on_facts_update_button_clicked" : self.factsUpdateAction, "on_submit_button_clicked" : self.submitToken, "on_unregister_button_click" : self.unregisterAction} self.setAccountMsg() rhsm_xml.signal_autoconne... | def __init__(self): dic = { "on_register_token_close_clicked" : self.finish, "on_change_account_button" : self.reRegisterAction, "on_facts_update_button_clicked" : self.factsUpdateAction, "on_submit_button_clicked" : self.submitToken, "on_unregister_button_click" : self.unregisterAction} self.setAccountMsg() rhsm_xml.s... | 449,379 |
def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer available_ent = 0 if consumer.has_key('uuid'): self.availableList = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, \ gobject.TYPE_STRING, gobject.... | def __init__(self): global UEP self.selected = {} self.csstatus = rhsm_xml.get_widget("select_status") self.total = 0 self.consumer = consumer available_ent = 0 if consumer.has_key('uuid'): self.availableList = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, \ gobject.TYPE_STRING, gobject.... | 449,380 |
def finish(self): self.addWin.hide() self.addWin.destroy() gtk.main_iteration() | def finish(self): self.addWin.hide() gtk.main_iteration() | 449,381 |
def cancel(self, button): self.addWin.destroy() gtk.main_iteration() | def cancel(self, button): self.addWin.destroy() gtk.main_iteration() | 449,382 |
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,383 |
def col_matched_selected(self, cell, path, model): items, iter = self.match_tv.get_selection().get_selected() model[path][0] = not model[path][0] self.model = model state = model.get_value(iter, 0) self.selected[model.get_value(iter, 4)] = (state, model.get_value(iter, 1), iter) if state: self.total += 1 else: self.tot... | def col_matched_selected(self, cell, path, model): items, iter = self.match_tv.get_selection().get_selected() model[path][0] = not model[path][0] self.model = model state = model.get_value(iter, 0) self.selected[model.get_value(iter, 4)] = (state, model.get_value(iter, 1), iter) if state: self.total += 1 else: self.tot... | 449,384 |
def __init__(self, product_selection): global UEP | def __init__(self, product_selection): global UEP | 449,385 |
def __init__(self): self.add_vbox = rhsm_xml.get_widget("import_vbox") | def __init__(self): self.add_vbox = rhsm_xml.get_widget("import_vbox") | 449,386 |
def onRegisterAction(self, button): self.uname = self.registerxml.get_widget("account_login") self.passwd = self.registerxml.get_widget("account_password") | def onRegisterAction(self, button): self.uname = self.registerxml.get_widget("account_login") self.passwd = self.registerxml.get_widget("account_password") | 449,387 |
def _do_command(self): """ Executes the command. """ self._validate_options() | def _do_command(self): """ Executes the command. """ self._validate_options() | 449,388 |
def _do_command(self): | def _do_command(self): | 449,389 |
def _validate_options(self): if not ConsumerIdentity.exists() and not (self.options.username and self.options.password): print (_("Error: username and password are required to re-register, try re-register --help.\n")) sys.exit(-1) | def _validate_options(self): if not ConsumerIdentity.existsAndValid() and not (self.options.username and self.options.password): print (_("""Error: username and password are required to re-register. \nConsumer identity either does not exists or is corrupted. Try re-register --help.""")) sys.exit(-1) | 449,390 |
def _do_command(self): | def _do_command(self): | 449,391 |
def _do_command(self): """ Executes the command. """ self._validate_options() | def _do_command(self): """ Executes the command. """ self._validate_options() | 449,392 |
def _do_command(self): """ Executes the command. """ self._validate_options() | def _do_command(self): """ Executes the command. """ self._validate_options() | 449,393 |
def delta(self): """ return a dict of any key/values that have changed including new keys or deleted keys """ cached_facts = self.read(self.fact_cache) diff = {} self.facts = self.get_facts() # compare the dicts to see if there is a diff | def delta(self): """ return a dict of any key/values that have changed including new keys or deleted keys """ cached_facts = self.read(self.fact_cache) diff = {} self.facts = self.get_facts() # compare the dicts to see if there is a diff | 449,394 |
def __init__ (self, title, text, type="ok", default=None, parent=None): self.rc = None if type == 'ok': buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_INFO elif type == 'warning': buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_WARNING elif type == 'okcancel': buttons = gtk.BUTTONS_OK_CANCEL style = gtk.MESSAGE_WARNING elif... | def __init__ (self, title, text, type="ok", default=None, parent=None): self.rc = None if type == 'ok': buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_INFO elif type == 'warning': buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_WARNING elif type == 'okcancel': buttons = gtk.BUTTONS_OK_CANCEL style = gtk.MESSAGE_WARNING elif... | 449,395 |
def _do_command(self): """ Executes the command. """ self._validate_options() consumer = check_registration()['uuid'] try: if self.options.product: for product in self.options.product: bundles = self.cp.bindByProduct(consumer, product) log.info("Info: Successfully subscribed the machine to product %s" % product) | def _do_command(self): """ Executes the command. """ self._validate_options() consumer = check_registration()['uuid'] try: if self.options.product: for product in self.options.product: bundles = self.cp.bindByProduct(consumer, product) log.info("Info: Successfully subscribed the machine to product %s" % product) | 449,396 |
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,397 |
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,398 |
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,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.