rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
local("python2.6 manage.py syncdb") local("python2.6 manage.py loaddata fixtures/*") | local("python2.6 manage.py syncdb --noinput") local("python2.6 manage.py loaddata fixtures/*") | def db_restart(): "Delete and rebuild database on the local" with settings(warn_only=True): local("rm kelpdb") local("python2.6 manage.py syncdb") local("python2.6 manage.py loaddata fixtures/*") | d17cd9688353b6db1135946f0f568dd0cd10eb51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/d17cd9688353b6db1135946f0f568dd0cd10eb51/fabfile.py |
sudo("su -c 'rm ../kelpdb' www-data") sudo("su -c './manage.py syncdb' www-data") sudo("su -c './manage.py loaddata fixtures/*' www-data)") | with settings(warn_only=True): sudo("su -c 'rm ../kelpdb' www-data") sudo("su -c 'python manage.py syncdb --noinput' www-data") sudo("su -c 'python manage.py loaddata fixtures/*' www-data)") | def restart_database(): "Delete and rebuild the database on the remote" with cd("/home/kelp/kelp"): sudo("su -c 'rm ../kelpdb' www-data") sudo("su -c './manage.py syncdb' www-data") sudo("su -c './manage.py loaddata fixtures/*' www-data)") | d17cd9688353b6db1135946f0f568dd0cd10eb51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/d17cd9688353b6db1135946f0f568dd0cd10eb51/fabfile.py |
argv = argv or list(sys.argv[1:]) | if argv is not None: argv = argv else: argv = list(sys.argv[1:]) | def main(argv=None, **kwargs): """Shell interface to :mod:`migrate.versioning.api`. kwargs are default options that can be overriden with passing --some_option as command line option :param disable_logging: Let migrate configure logging :type disable_logging: bool """ argv = argv or list(sys.argv[1:]) commands = list... | ff93b652ca85268cd19f665ada31100bda34beda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/ff93b652ca85268cd19f665ada31100bda34beda/shell.py |
"""Can change a column's type""" self.table.c.data.alter(name='data', type=String(42)) self.refresh_table(self.table.name) self.assert_(isinstance(self.table.c.data.type, String)) self.assertEquals(self.table.c.data.type.length, 42) | def test_type(self): """Can change a column's type""" # Entire column definition given self.table.c.data.alter(name='data', type=String(42)) self.refresh_table(self.table.name) self.assert_(isinstance(self.table.c.data.type, String)) self.assertEquals(self.table.c.data.type.length, 42) | 10a16f52517d08a9bc473eb27ccc3512dec96da2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/10a16f52517d08a9bc473eb27ccc3512dec96da2/test_changeset.py | |
self.table.c.data.alter(name='data', type=String(40), server_default=DefaultClause(default)) | self.table.c.data.alter(type=String(40), server_default=DefaultClause(default)) | def test_default(self): """Can change a column's server_default value (DefaultClauses only) Only DefaultClauses are changed here: others are managed by the application / by SA """ self.assertEquals(self.table.c.data.server_default.arg, 'tluafed') | 10a16f52517d08a9bc473eb27ccc3512dec96da2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/10a16f52517d08a9bc473eb27ccc3512dec96da2/test_changeset.py |
self.table.c.data.alter(name='data', type=String(40), nullable=False) | self.table.c.data.alter(type=String(40), nullable=False) | def test_null(self): """Can change a column's null constraint""" self.assertEquals(self.table.c.data.nullable, True) | 10a16f52517d08a9bc473eb27ccc3512dec96da2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/10a16f52517d08a9bc473eb27ccc3512dec96da2/test_changeset.py |
def test_alter_metadata_deprecated(self): | def test_alter_deprecated(self): | def test_alter_metadata_deprecated(self): try: # py 2.4 compatability :-/ cw = catch_warnings(record=True) w = cw.__enter__() warnings.simplefilter("always") self.table.c.data.alter(Column('data', String(100))) | 10a16f52517d08a9bc473eb27ccc3512dec96da2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/10a16f52517d08a9bc473eb27ccc3512dec96da2/test_changeset.py |
self.table.c.data.alter(name='data', type=String(200), alter_metadata=False) | self.table.c.data.alter(type=String(200),alter_metadata=False) | def test_alter_metadata(self): """Test if alter_metadata is respected""" | 10a16f52517d08a9bc473eb27ccc3512dec96da2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/10a16f52517d08a9bc473eb27ccc3512dec96da2/test_changeset.py |
delta = self.table.c.data.alter(name='data', type=String(100)) | delta = self.table.c.data.alter(type=String(100)) | def test_alter_returns_delta(self): """Test if alter constructs return delta""" | 10a16f52517d08a9bc473eb27ccc3512dec96da2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/10a16f52517d08a9bc473eb27ccc3512dec96da2/test_changeset.py |
self._category_name = category.__name__ if category else None | if category: self._category_name = category.__name__ else: self._category_name = None | def __init__(self, message, category, filename, lineno, file=None, line=None): local_values = locals() for attr in self._WARNING_DETAILS: setattr(self, attr, local_values[attr]) self._category_name = category.__name__ if category else None | dceff55ff41235cad7b9d53b51e9525ffabc4ca0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/dceff55ff41235cad7b9d53b51e9525ffabc4ca0/warnings.py |
self.compare_columns_equal(cons.columns, self.table.primary_key) | if SQLA_06: self.compare_columns_equal(cons.columns, self.table.primary_key) else: self.compare_columns_equal(cons.columns, self.table.primary_key, ['autoincrement']) | def test_autoname_pk(self): """PrimaryKeyConstraints can guess their name if None is given""" # Don't supply a name; it should create one cons = PrimaryKeyConstraint(self.table.c.id) cons.create() self.refresh_table() if not self.url.startswith('sqlite'): # TODO: test for index for sqlite self.compare_columns_equal(con... | 5ab0719e3f2ea9515b941055f2eb0b0c193124a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/5ab0719e3f2ea9515b941055f2eb0b0c193124a3/test_constraint.py |
import os; print "*****************************", os.environ.get('PYTHONPATH', 'ARGH FUCK') | def load_model(dotted_name): """Import module and use module-level variable". :param dotted_name: path to model in form of string: ``some.python.module:Class`` .. versionchanged:: 0.5.4 """ if isinstance(dotted_name, basestring): if ':' not in dotted_name: # backwards compatibility warnings.warn('model should be in ... | 330b0ad2ec9230d7ae39ed6198fd27a53c04e3f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/330b0ad2ec9230d7ae39ed6198fd27a53c04e3f2/__init__.py | |
if self.table and self.alter_metadata: | if self.table is not None and self.alter_metadata: | def apply_diffs(self, diffs): """Populate dict and column object with new values""" self.diffs = diffs for key in self.diff_keys: if key in diffs: setattr(self.result_column, key, diffs[key]) | 3dfb8c8a293271bfbc995c07a6c1543479e9a3a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/3dfb8c8a293271bfbc995c07a6c1543479e9a3a8/schema.py |
if table and not self.table: | if table is not None and self.table is None: | def add_to_table(self, table): if table and not self.table: self._set_parent(table) | 3dfb8c8a293271bfbc995c07a6c1543479e9a3a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/3dfb8c8a293271bfbc995c07a6c1543479e9a3a8/schema.py |
self.table = k.pop('table', None) or col.table | self.table = k.pop('table', None) if self.table is None: self.table = col.table | def compare_1_column(self, col, *p, **k): """Compares one Column object""" self.table = k.pop('table', None) or col.table self.result_column = col if len(p): k = self._extract_parameters(p, k, self.result_column) return k | f9159b6851ad229bdb82140ee721038665d9c279 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/f9159b6851ad229bdb82140ee721038665d9c279/schema.py |
self.table = k.pop('table', None) or old_col.table or new_col.table | self.table = k.pop('table', None) if self.table is None: self.table = old_col.table if self.table is None: new_col.table | def compare_2_columns(self, old_col, new_col, *p, **k): """Compares two Column objects""" self.process_column(new_col) self.table = k.pop('table', None) or old_col.table or new_col.table self.result_column = old_col | f9159b6851ad229bdb82140ee721038665d9c279 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/f9159b6851ad229bdb82140ee721038665d9c279/schema.py |
def assert_numcols(num_of_expected_cols): # number of cols should be correct in table object and in database self.refresh_table(self.table_name) result = len(self.table.c) self.assertEquals(result, num_of_expected_cols), if col_k.get('primary_key', None): # new primary key: check its length too result = len(self.table... | 230fcef65e1ed4cb1e615fc2a1be1c38e0921fcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/230fcef65e1ed4cb1e615fc2a1be1c38e0921fcd/test_changeset.py | ||
col2 = getattr(self.table.c, col_name) self.assertEquals(col2, col) | self.assert_(self.table.c.data.type.length, 40) col2 = self.table.c.data | def assert_numcols(num_of_expected_cols): # number of cols should be correct in table object and in database self.refresh_table(self.table_name) result = len(self.table.c) self.assertEquals(result, num_of_expected_cols), if col_k.get('primary_key', None): # new primary key: check its length too result = len(self.table... | 230fcef65e1ed4cb1e615fc2a1be1c38e0921fcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/230fcef65e1ed4cb1e615fc2a1be1c38e0921fcd/test_changeset.py |
" parameter (since version > 0.5.4)", MigrateDeprecationWarning) | " parameter (since version > 0.5.4)", exceptions.MigrateDeprecationWarning) | def run(self, engine, step): """Core method of Script file. Exectues :func:`update` or :func:`downgrade` functions | dffe82653cbd23cb003cd40114e2d5e331061c8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/dffe82653cbd23cb003cd40114e2d5e331061c8a/py.py |
asd | def test_main_with_runpy(self): if sys.version_info[:2] == (2, 4): raise SkipTest("runpy is not part of python2.4") asd try: run_module('migrate.versioning.shell', run_name='__main__') except: pass | aeb2b72b20413c84046d62d0c83d12ed26ab4046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/aeb2b72b20413c84046d62d0c83d12ed26ab4046/test_shell.py | |
if isinstance(repository, str): | if isinstance(repository, basestring): | def __init__(self, engine, repository): if isinstance(repository, str): repository = Repository(repository) self.engine = engine self.repository = repository self.meta = MetaData(engine) self.load() | c135f48fbf6a7daf3a123eb00c25156f10ea183d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/c135f48fbf6a7daf3a123eb00c25156f10ea183d/schema.py |
raise exceptions.InvalidScriptError(path + ': %s' % str(e)) | raise InvalidScriptError(path + ': %s' % str(e)) | def verify_module(cls, path): """Ensure path is a valid script :param path: Script location :type path: string :raises: :exc:`InvalidScriptError <migrate.exceptions.InvalidScriptError>` :returns: Python module """ # Try to import and get the upgrade() func module = import_path(path) try: assert callable(module.upgrade... | 20fce9acd80f9b82886fd36322c68ec6097be72b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/20fce9acd80f9b82886fd36322c68ec6097be72b/py.py |
raise exceptions.ScriptError("%d is not a valid step" % step) | raise ScriptError("%d is not a valid step" % step) | def run(self, engine, step): """Core method of Script file. Exectues :func:`update` or :func:`downgrade` functions | 20fce9acd80f9b82886fd36322c68ec6097be72b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/20fce9acd80f9b82886fd36322c68ec6097be72b/py.py |
" parameter (since version > 0.5.4)", exceptions.MigrateDeprecationWarning) | " parameter (since version > 0.5.4)", MigrateDeprecationWarning) | def run(self, engine, step): """Core method of Script file. Exectues :func:`update` or :func:`downgrade` functions | 20fce9acd80f9b82886fd36322c68ec6097be72b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/20fce9acd80f9b82886fd36322c68ec6097be72b/py.py |
ret = "%(table)s_%(reftable)s_fkey" % dict( | ret = "%(table)s_%(firstcolumn)s_fkey" % dict( | def autoname(self): """Mimic the database's automatic constraint names""" ret = "%(table)s_%(reftable)s_fkey" % dict( table=self.table.name, reftable=self.reftable.name,) return ret | 73796f3e543a121b51a0fe2eb08d1faab255e53b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/73796f3e543a121b51a0fe2eb08d1faab255e53b/constraint.py |
reftable=self.reftable.name,) | firstcolumn=self.columns[0],) | def autoname(self): """Mimic the database's automatic constraint names""" ret = "%(table)s_%(reftable)s_fkey" % dict( table=self.table.name, reftable=self.reftable.name,) return ret | 73796f3e543a121b51a0fe2eb08d1faab255e53b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/73796f3e543a121b51a0fe2eb08d1faab255e53b/constraint.py |
self._module = sys.modules['warnings'] if module is None else module | if module is None: self._module = sys.modules['warnings'] else: self._module = module | def __init__(self, record=False, module=None): """Specify whether to record warnings and if an alternative module should be used other than sys.modules['warnings']. | c85bbec26c3456617cb958539065a222d29c3c07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/c85bbec26c3456617cb958539065a222d29c3c07/warnings.py |
model_module = 'test.fixture.models:meta_rundiffs' old_model_module = 'test.fixture.models:meta_old_rundiffs' | model_module = 'tests.fixture.models:meta_rundiffs' old_model_module = 'tests.fixture.models:meta_old_rundiffs' | def test_rundiffs_in_shell(self): # This is a variant of the test_schemadiff tests but run through the shell level. # These shell tests are hard to debug (since they keep forking processes), so they shouldn't replace the lower-level tests. repos_name = 'repos_name' repos_path = self.tmp() script_path = self.tmp_py() mo... | 043ceb899e7a6aa5efe76ae49b87014a51fcee85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/043ceb899e7a6aa5efe76ae49b87014a51fcee85/test_shell.py |
if fs is None: fs = fs2.copy() else: if len(fs2) > 0 or overlap_mode == "intersection-strict": | if len(fs2) > 0 or overlap_mode == "intersection-strict": if fs is None: fs = fs2.copy() else: | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} for f in HTSeq.GFF_Reader( gff_filename ): if f.iv.chrom not in features.step_vectors.keys(): features.add_chrom( f.iv.chrom ) if f.type... | cd8917a92177d7590468563063105f527560c0d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/cd8917a92177d7590468563063105f527560c0d4/count.py |
if len( fs ) == 0: | if fs is None or len( fs ) == 0: | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} for f in HTSeq.GFF_Reader( gff_filename ): if f.iv.chrom not in features.step_vectors.keys(): features.add_chrom( f.iv.chrom ) if f.type... | cd8917a92177d7590468563063105f527560c0d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/cd8917a92177d7590468563063105f527560c0d4/count.py |
self.step_vectors[ chrom ][ strand ][ 0 : chrom_lengths[chrom] ] = set() | self.step_vectors[ chrom ][ "+" ][ : ] = set() self.step_vectors[ chrom ][ "-" ][ : ] = set() | def __init__( self, chrom_lengths, stranded=True ): GenomicArray.__init__( self, chrom_lengths, stranded, 'O' ) for chrom in self.step_vectors: if self.stranded: self.step_vectors[ chrom ][ strand ][ 0 : chrom_lengths[chrom] ] = set() else: self.step_vectors[ chrom ][ 0 : chrom_lengths[chrom] ] = set() | 8b64e2c10bcd0b13c625acde425e0e96e01a28e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/8b64e2c10bcd0b13c625acde425e0e96e01a28e5/__init__.py |
self.step_vectors[ chrom ][ 0 : chrom_lengths[chrom] ] = set() | self.step_vectors[ chrom ][ : ] = set() | def __init__( self, chrom_lengths, stranded=True ): GenomicArray.__init__( self, chrom_lengths, stranded, 'O' ) for chrom in self.step_vectors: if self.stranded: self.step_vectors[ chrom ][ strand ][ 0 : chrom_lengths[chrom] ] = set() else: self.step_vectors[ chrom ][ 0 : chrom_lengths[chrom] ] = set() | 8b64e2c10bcd0b13c625acde425e0e96e01a28e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/8b64e2c10bcd0b13c625acde425e0e96e01a28e5/__init__.py |
rr = r if not pe_mode else r[0] sys.stderr.write( ( "Warning: Skipping read '%s', because chromosome " + "'%s', to which it has been aligned, did not appear in the GFF file.\n" ) % ( rr.read.name, iv.chrom ) ) | if not pe_mode: rr = r else: rr = r[0] if r[0] is not None else r[1] if not quiet: sys.stderr.write( ( "Warning: Skipping read '%s', because chromosome " + "'%s', to which it has been aligned, did not appear in the GFF file.\n" ) % ( rr.read.name, iv.chrom ) ) | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} # Try to open samfile to fail early in case it is not there open( sam_filename ).close() for f in HTSeq.GFF_Reader( gff_filename ): if ... | 5505926669941075931bceba40854824edbf5660 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/5505926669941075931bceba40854824edbf5660/count.py |
"Public License v3. Part of the 'HTSeq' framework." ) | "Public License v3. Part of the 'HTSeq' framework, version %s." % HTSeq.__version__ ) | def main(): optParser = optparse.OptionParser( usage = "%prog [options] sam_file gff_file", description= "This script takes an alignment file in SAM format and a " + "feature file in GFF format and calculates for each feature " + "the number of reads mapping to it. See " + "http://www-huber.embl.de/users/anders/HTSe... | 5505926669941075931bceba40854824edbf5660 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/5505926669941075931bceba40854824edbf5660/count.py |
help = "suppress progress report" ) | help = "suppress progress report and warnings" ) | def main(): optParser = optparse.OptionParser( usage = "%prog [options] sam_file gff_file", description= "This script takes an alignment file in SAM format and a " + "feature file in GFF format and calculates for each feature " + "the number of reads mapping to it. See " + "http://www-huber.embl.de/users/anders/HTSe... | 5505926669941075931bceba40854824edbf5660 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/5505926669941075931bceba40854824edbf5660/count.py |
except Exception: | except: | def main(): optParser = optparse.OptionParser( usage = "%prog [options] sam_file gff_file", description= "This script takes an alignment file in SAM format and a " + "feature file in GFF format and calculates for each feature " + "the number of reads mapping to it. See " + "http://www-huber.embl.de/users/anders/HTSe... | 5505926669941075931bceba40854824edbf5660 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/5505926669941075931bceba40854824edbf5660/count.py |
except: sys.stderr.write( "Error occured when reading first line of sam file." ) raise try: | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet, minaqual ): if quiet: warnings.filterwarnings( action="ignore", module="HTSeq" ) features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} # Try to open samfile to fail early in case it is not th... | bb663baa8634d414aabef8b0c4d9532f0d2a72ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/bb663baa8634d414aabef8b0c4d9532f0d2a72ff/count.py | |
try: | if not pe_mode: | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet, minaqual ): if quiet: warnings.filterwarnings( action="ignore", module="HTSeq" ) features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} # Try to open samfile to fail early in case it is not th... | bb663baa8634d414aabef8b0c4d9532f0d2a72ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/bb663baa8634d414aabef8b0c4d9532f0d2a72ff/count.py |
except AttributeError: pass | else: sys.stderr.write( "Error occured in %s.\n" % read_seq_pe_file.get_line_number_string() ) | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet, minaqual ): if quiet: warnings.filterwarnings( action="ignore", module="HTSeq" ) features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} # Try to open samfile to fail early in case it is not th... | bb663baa8634d414aabef8b0c4d9532f0d2a72ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/bb663baa8634d414aabef8b0c4d9532f0d2a72ff/count.py |
features.add_value( f.attr[ id_attribute ], f.iv ) | feature_id = f.attr[ id_attribute ] | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} for f in HTSeq.GFF_Reader( gff_filename ): if f.iv.chrom not in features.step_vectors.keys(): features.add_chrom( f.iv.chrom ) if f.type... | a4e70671af072650a170131c70e58179dc942f32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/a4e70671af072650a170131c70e58179dc942f32/count.py |
def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} for f in HTSeq.GFF_Reader( gff_filename ): if f.iv.chrom not in features.step_vectors.keys(): features.add_chrom( f.iv.chrom ) if f.type... | e4c507942122bb50013f9c58d48fa01cecf2473e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/e4c507942122bb50013f9c58d48fa01cecf2473e/count.py | ||
count_reads_in_features( args[0], args[1], opts.stranded == "yes", opts.mode, opts.featuretype, opts.idattr, opts.quiet ) def my_showwarning( message, category, filename, lineno = None, line = None ): sys.stderr.write( "Warning: %s\n" % message ) if __name__ == "__main__": | def main(): optParser = optparse.OptionParser( usage = "%prog [options] sam_file gff_file", description= "This script takes an alignment file in SAM format and a " + "feature file in GFF format and calculates for each feature " + "the number of reads mapping to it. See " + "http://www-huber.embl.de/users/anders/HTSeq... | e4c507942122bb50013f9c58d48fa01cecf2473e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/e4c507942122bb50013f9c58d48fa01cecf2473e/count.py | |
main() | count_reads_in_features( args[0], args[1], opts.stranded == "yes", opts.mode, opts.featuretype, opts.idattr, opts.quiet ) | def my_showwarning( message, category, filename, lineno = None, line = None ): sys.stderr.write( "Warning: %s\n" % message ) | e4c507942122bb50013f9c58d48fa01cecf2473e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/e4c507942122bb50013f9c58d48fa01cecf2473e/count.py |
sys.stderr.write( ( "Warning: Skipping read '%s', aligned to %s, because " + "chromosome '%s' did not appear in the GFF file.\n" ) % ( r.read.name, r.iv, r.iv.chrom ) ) | rr = r if not pe_mode else r[0] sys.stderr.write( ( "Warning: Skipping read '%s', because chromosome " + "'%s', to which it has been aligned, did not appear in the GFF file.\n" ) % ( rr.read.name, iv.chrom ) ) | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} for f in HTSeq.GFF_Reader( gff_filename ): if f.iv.chrom not in features.step_vectors.keys(): features.add_chrom( f.iv.chrom ) if f.type... | d545b06c8e451079b0b27eab59ad53628883ec02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/d545b06c8e451079b0b27eab59ad53628883ec02/count.py |
print "attr:", attrStr | def parse_GFF_attribute_string( attrStr, extra_return_first_value=False ): """Parses a GFF attribute string and returns it as a dictionary. If 'extra_return_first_value' is set, a pair is returned: the dictionary and the value of the first attribute. This might be useful if this is the ID. """ if attrStr.endswith( "\n... | 85bc31cc753c8854d083ca0819b21990557f1924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/85bc31cc753c8854d083ca0819b21990557f1924/__init__.py | |
print seqname, length | def get_sequence_lengths( self ): seqname = None seqlengths = {} for line in FileOrSequence.__iter__( self ): if line.startswith( ">" ): if seqname is not None: seqlengths[ seqname ] = length print seqname, length mo = _re_fasta_header_line.match( line ) seqname = mo.group(1) length = 0 else: assert seqname is not None... | 85bc31cc753c8854d083ca0819b21990557f1924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/85bc31cc753c8854d083ca0819b21990557f1924/__init__.py | |
pass else: algnt = SAM_Alignment( line ) yield algnt | continue algnt = SAM_Alignment( line ) yield algnt | def __iter__( self ): for line in FileOrSequence.__iter__( self ): if line.startswith( "@" ): # do something with the header line pass | a7f21742ae7806173ad146a5c258e435b3a4a81a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/a7f21742ae7806173ad146a5c258e435b3a4a81a/HTSeq.py |
def __init__( self, dict chrom_lengths, bool stranded=True ): | def __init__( self, chrom_lengths, stranded=True ): | def __init__( self, dict chrom_lengths, bool stranded=True ): GenomicArray.__init__( self, chrom_lengths, stranded, 'O' ) for chrom in self.step_vectors: if self.stranded: self.step_vectors[ chrom ][ strand ][ 0 : self.chrom_lengths[chrom] ] = set() else: self.step_vectors[ chrom ][ 0 : self.chrom_lengths[chrom] ] = se... | a7f21742ae7806173ad146a5c258e435b3a4a81a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/a7f21742ae7806173ad146a5c258e435b3a4a81a/HTSeq.py |
self.step_vectors[ chrom ][ strand ][ 0 : self.chrom_lengths[chrom] ] = set() | self.step_vectors[ chrom ][ strand ][ 0 : chrom_lengths[chrom] ] = set() | def __init__( self, dict chrom_lengths, bool stranded=True ): GenomicArray.__init__( self, chrom_lengths, stranded, 'O' ) for chrom in self.step_vectors: if self.stranded: self.step_vectors[ chrom ][ strand ][ 0 : self.chrom_lengths[chrom] ] = set() else: self.step_vectors[ chrom ][ 0 : self.chrom_lengths[chrom] ] = se... | a7f21742ae7806173ad146a5c258e435b3a4a81a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/a7f21742ae7806173ad146a5c258e435b3a4a81a/HTSeq.py |
self.step_vectors[ chrom ][ 0 : self.chrom_lengths[chrom] ] = set() | self.step_vectors[ chrom ][ 0 : chrom_lengths[chrom] ] = set() | def __init__( self, dict chrom_lengths, bool stranded=True ): GenomicArray.__init__( self, chrom_lengths, stranded, 'O' ) for chrom in self.step_vectors: if self.stranded: self.step_vectors[ chrom ][ strand ][ 0 : self.chrom_lengths[chrom] ] = set() else: self.step_vectors[ chrom ][ 0 : self.chrom_lengths[chrom] ] = se... | a7f21742ae7806173ad146a5c258e435b3a4a81a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/a7f21742ae7806173ad146a5c258e435b3a4a81a/HTSeq.py |
newset = set.copy() | newset = oldset.copy() | def _f( oldset ): newset = set.copy() newset.add( value ) return newset | a7f21742ae7806173ad146a5c258e435b3a4a81a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/a7f21742ae7806173ad146a5c258e435b3a4a81a/HTSeq.py |
sys.stderr.write( "Error: %s\n" % "; ".join( sys.exc_info()[1] ) ) | sys.stderr.write( "Error: %s\n" % str( sys.exc_info()[1] ) ) | def main(): optParser = optparse.OptionParser( usage = "%prog [options] sam_file gff_file", description= "This script takes an alignment file in SAM format and a " + "feature file in GFF format and calculates for each feature " + "the number of reads mapping to it. See " + "http://www-huber.embl.de/users/anders/HTSe... | 12b2a1167161826f9f9f63bbf14c4ea43e648502 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/12b2a1167161826f9f9f63bbf14c4ea43e648502/count.py |
fd = open(lockfile, 'r') | try: fd = open(lockfile, 'r') except (IOError, OSError), e: msg = _("Could not open lock %s: %s") % (lockfile, e) raise Errors.LockError(1, msg) | def doLock(self, lockfile = YUM_PID_FILE): """perform the yum locking, raise yum-based exceptions, not OSErrors""" # if we're not root then we don't lock - just return nicely if self.conf.uid != 0: return root = self.conf.installroot lockfile = root + '/' + lockfile # lock in the chroot lockfile = os.path.normpath(lo... | 87f1288ae093b26eeee5dda7cb2ac256679a201f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/87f1288ae093b26eeee5dda7cb2ac256679a201f/__init__.py |
my_csum = misc.checksum(csum_type, fp) my_st_size = fp.read_size | if fp.read_size: my_csum = misc.checksum(csum_type, fp) my_st_size = fp.read_size | def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "... | 32b079e932aeac8b00d610927107ba4474b36151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/32b079e932aeac8b00d610927107ba4474b36151/packages.py |
prob.disk_value = my_st.st_size | prob.disk_value = my_st_size | def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "... | 32b079e932aeac8b00d610927107ba4474b36151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/32b079e932aeac8b00d610927107ba4474b36151/packages.py |
self.logger.warning(_("Removing %s from the transaction") % txmbr) | self.logger.info(_("Removing %s from the transaction") % txmbr) | def remove(self, po=None, **kwargs): """try to find and mark for remove the specified package(s) - if po is specified then that package object (if it is installed) will be marked for removal. if no po then look at kwargs, if neither then raise an exception""" | 2e1ac8d5220de0614fd1c3aebb03ab8448f85202 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/2e1ac8d5220de0614fd1c3aebb03ab8448f85202/__init__.py |
def _get_cached_simpleVersion_main(self): """ Return the cached string of the main rpmdbv. """ if self._have_cached_rpmdbv_data is not None: return self._have_cached_rpmdbv_data | a079025ebb241849ba734b47607af9eb0c2ae9a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a079025ebb241849ba734b47607af9eb0c2ae9a3/rpmsack.py | ||
omtime = os.path.getmtime(rpmdbfname) | omtime = os.path.getctime(rpmdbfname) | def _get_cached_simpleVersion_main(self): """ Return the cached string of the main rpmdbv. """ if self._have_cached_rpmdbv_data is not None: return self._have_cached_rpmdbv_data | a079025ebb241849ba734b47607af9eb0c2ae9a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a079025ebb241849ba734b47607af9eb0c2ae9a3/rpmsack.py |
('-c', '-d', '-e', '--installroot', | ('-c', '--config', '-d', '--debuglevel', '-e', '--errorlevel', '--installroot', | def firstParse(self,args): # Parse only command line options that affect basic yum setup try: args = _filtercmdline( ('--noplugins','--version','-q', '-v', "--quiet", "--verbose"), ('-c', '-d', '-e', '--installroot', '--disableplugin', '--enableplugin', '--releasever', '--setopt'), args) except ValueError, arg: self.ba... | 02ad9f769caf5e9334e69e480684627f61caf19c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/02ad9f769caf5e9334e69e480684627f61caf19c/cli.py |
return 1, ['Failed history info'] | return 1, ['Failed history list'] | def historyListCmd(self, extcmds): """ Shows the user a list of data about the history. """ | 6adb022fd54b7232c7d4410313c029f8a3a87313 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/6adb022fd54b7232c7d4410313c029f8a3a87313/output.py |
try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info'] except TypeError: pass | if tid == 'last': tid = None if tid is not None: try: int(tid) except ValueError: self.logger.critical(_('Bad transaction ID given')) return 1, ['Failed history addon-info'] | def historyAddonInfoCmd(self, extcmds): tid = None if len(extcmds) > 1: tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info'] except TypeError: pass # No tid arg. passed, use last... | d224e3d7a16100c8697754a7be717fb2f17db121 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/d224e3d7a16100c8697754a7be717fb2f17db121/output.py |
def _try_read_cpuinfo(): """ Try to read /proc/cpuinfo ... if we can't ignore errors (ie. proc not mounted). """ try: lines = open("/proc/cpuinfo", "r").readlines() return lines except: return [] | def getArchList(thisarch=None): # this returns a list of archs that are compatible with arch given if not thisarch: thisarch = canonArch archlist = [thisarch] while thisarch in arches: thisarch = arches[thisarch] archlist.append(thisarch) # hack hack hack # sparc64v is also sparc64 compat if archlist[0] == "sparc64v"... | ff24179876401b3c6526b90df89c767e8091afb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ff24179876401b3c6526b90df89c767e8091afb3/arch.py | |
f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: | for line in _try_read_cpuinfo(): | def getCanonX86Arch(arch): # if arch == "i586": f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: if line.startswith("model name") and line.find("Geode(TM)") != -1: return "geode" return arch # only athlon vs i686 isn't handled with uname currently if arch != "i686": return arch # if we... | ff24179876401b3c6526b90df89c767e8091afb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ff24179876401b3c6526b90df89c767e8091afb3/arch.py |
f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: | for line in _try_read_cpuinfo(): | def getCanonX86Arch(arch): # if arch == "i586": f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: if line.startswith("model name") and line.find("Geode(TM)") != -1: return "geode" return arch # only athlon vs i686 isn't handled with uname currently if arch != "i686": return arch # if we... | ff24179876401b3c6526b90df89c767e8091afb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ff24179876401b3c6526b90df89c767e8091afb3/arch.py |
f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: | for line in _try_read_cpuinfo(): | def getCanonPPCArch(arch): # FIXME: should I do better handling for mac, etc? if arch != "ppc64": return arch machine = None f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: if line.find("machine") != -1: machine = line.split(':')[1] break if machine is None: return arch if machine.fi... | ff24179876401b3c6526b90df89c767e8091afb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ff24179876401b3c6526b90df89c767e8091afb3/arch.py |
f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: | for line in _try_read_cpuinfo(): | def getCanonSPARCArch(arch): # Deal with sun4v, sun4u, sun4m cases SPARCtype = None f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: if line.startswith("type"): SPARCtype = line.split(':')[1] break if SPARCtype is None: return arch if SPARCtype.find("sun4v") != -1: if arch.startswith("... | ff24179876401b3c6526b90df89c767e8091afb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ff24179876401b3c6526b90df89c767e8091afb3/arch.py |
f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: | for line in _try_read_cpuinfo(): | def getCanonX86_64Arch(arch): if arch != "x86_64": return arch vendor = None f = open("/proc/cpuinfo", "r") lines = f.readlines() f.close() for line in lines: if line.startswith("vendor_id"): vendor = line.split(':')[1] break if vendor is None: return arch if vendor.find("Authentic AMD") != -1 or vendor.find("Authent... | ff24179876401b3c6526b90df89c767e8091afb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ff24179876401b3c6526b90df89c767e8091afb3/arch.py |
fo.write(data) | fo.write(to_unicode(data)) | def write_addon_data(self, dataname, data): """append data to an arbitrary-named file in the history addon_path/transaction id location, returns True if write succeeded, False if not""" if not hasattr(self, '_tid'): # maybe we should raise an exception or a warning here? return False if not dataname: return False if... | ed12ee76209481f715f278069eb741c12bd72d7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ed12ee76209481f715f278069eb741c12bd72d7d/history.py |
raise Errors.YumBaseError, errors | self.logger.critical(_("Transaction couldn't start:")) for e in errors: self.logger.critical(e[0]) raise Errors.YumBaseError, _("Could not run transaction.") | def runTransaction(self, cb): """takes an rpm callback object, performs the transaction""" | a4f5edddc317cec91c83219485f4dd183accbbd4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a4f5edddc317cec91c83219485f4dd183accbbd4/__init__.py |
if os.path.link(dir_fsvars + fsvar): | if os.path.islink(dir_fsvars + fsvar): | def _apply_installroot(yumconf, option): path = getattr(yumconf, option) ir_path = yumconf.installroot + path ir_path = ir_path.replace('//', '/') # os.path.normpath won't fix this and # it annoys me ir_path = varReplace(ir_path, yumvars) setattr(yumconf, option, ir_path) | 7f5600232c8b8027663af447ce985d37f654cc6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/7f5600232c8b8027663af447ce985d37f654cc6b/config.py |
txmbr = self.tsInfo.addErase(toremove) | txmbr = self.tsInfo.addErase(po) | def _sort_and_filter_installonly(pkgs): """ Allow the admin to specify some overrides fo installonly pkgs. using the yumdb. """ ret_beg = [] ret_mid = [] ret_end = [] for pkg in sorted(pkgs): if 'installonly' not in pkg.yumdb_info: ret_mid.append(pkg) continue | 50b01cf6329d00e09a8586527afd9b72466df506 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/50b01cf6329d00e09a8586527afd9b72466df506/__init__.py |
if hasattr(self, 'repo_setopts') and thisrepo.id in self.repo_setopts: | if thisrepo.id in self.repo_setopts: | def getReposFromConfigFile(self, repofn, repo_age=None, validate=None): """read in repositories from a config .repo file""" | 3e1d76650dc1c5c6128a75230db80d50e56fde65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3e1d76650dc1c5c6128a75230db80d50e56fde65/__init__.py |
if len(obsoleting) > 1: first = obsoleting[0] obsoleting = [pkgtup for pkgtup in obsoleting if first[0] == pkgtup[0]] if len(obsoleting) > 1: def _sort_ver(x, y): n1,a1,e1,v1,r1 = x n2,a2,e2,v2,r2 = y return compareEVR((e1,v1,r1), (e2,v2,r2)) obsoleting.sort(_sort_ver) first = obsoleting[0] obsoleting = [pkgtup for p... | def _pkg2obspkg(self, po): """ Given a package return the package it's obsoleted by and so we should install instead. Or None if there isn't one. """ thispkgobsdict = self.up.checkForObsolete([po.pkgtup]) if po.pkgtup in thispkgobsdict: obsoleting = thispkgobsdict[po.pkgtup] oobsoleting = [] # We want to keep the arch... | 9a2fa66d899c8c2cd0a91d7dfc61a26cd01bc382 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/9a2fa66d899c8c2cd0a91d7dfc61a26cd01bc382/__init__.py | |
foo-1.i386 & foo-1.xf86_64 is updated by foo-2.i386 & foo-2.xf86_64 foo-2.xf86_64 has a missing req, and get skipped, foo-2.i386 has to be skipped to or it will fail in the rpm test transaction | foo-1.i386 & foo-1.x86_64 is updated by foo-2.i386 & foo-2.x86_64 foo-2.x86_64 has a missing req, and gets skipped, foo-2.i386 has to be skipped too or it will fail in the rpm test transaction | def testMultiLibUpdate(self): ''' foo-1.i386 & foo-1.xf86_64 is updated by foo-2.i386 & foo-2.xf86_64 foo-2.xf86_64 has a missing req, and get skipped, foo-2.i386 has to be skipped to or it will fail in the rpm test transaction ''' ipo1 = self.instPackage('foo', '1',arch='i386') ipo2 = self.instPackage('foo', '1',arch=... | 5c0bc917e29d3630f137a934a1b609fa708df277 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/5c0bc917e29d3630f137a934a1b609fa708df277/skipbroken-tests.py |
for txmbr in self.tsInfo: | for txmbr in sorted(self.tsInfo): | def _printTransaction(self): #transaction set states state = { TS_UPDATE : "update", TS_INSTALL : "install", TS_TRUEINSTALL: "trueinstall", TS_ERASE : "erase", TS_OBSOLETED : "obsoleted", TS_OBSOLETING : "obsoleting", TS_AVAILABLE : "available", TS_UPDATED : "updated"} | 255299b7b32bc5c5e09434271e8f97ae00eaea4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/255299b7b32bc5c5e09434271e8f97ae00eaea4f/__init__.py |
for po,rel in txmbr.relatedto: | for po,rel in sorted(txmbr.relatedto): | def _printTransaction(self): #transaction set states state = { TS_UPDATE : "update", TS_INSTALL : "install", TS_TRUEINSTALL: "trueinstall", TS_ERASE : "erase", TS_OBSOLETED : "obsoleted", TS_OBSOLETING : "obsoleting", TS_AVAILABLE : "available", TS_UPDATED : "updated"} | 255299b7b32bc5c5e09434271e8f97ae00eaea4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/255299b7b32bc5c5e09434271e8f97ae00eaea4f/__init__.py |
self.assertResult((all['arp3'], all['aoop1'], all['aoop2'])) | self.assertResult((all['arp3'], all['arp4'])) | def testRLDaplMessWeirdInst3(self): rps, aps, ret, all = self._helperRLDaplMess() res, msg = self.runOperation(['install', 'dapl-2.0.15'], rps, aps) | 9935466388d82a53bd429f645a4268d28a161c10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/9935466388d82a53bd429f645a4268d28a161c10/simpleobsoletestests.py |
self.assertResult((all['arp3'], all['aoop1'], all['aoop2'])) | self.assertResult((all['arp3'], all['arp4'])) | def testRLDaplMessWeirdUp3(self): rps, aps, ret, all = self._helperRLDaplMess() res, msg = self.runOperation(['update', 'dapl-2.0.15'], rps, aps) | 9935466388d82a53bd429f645a4268d28a161c10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/9935466388d82a53bd429f645a4268d28a161c10/simpleobsoletestests.py |
msg += """\n </format>""" | if msg[-1] != '\n': msg += """\n""" msg += """ </format>""" | def _dump_format_items(self): msg = " <format>\n" if self.license: msg += """ <rpm:license>%s</rpm:license>\n""" % misc.to_xml(self.license) else: msg += """ <rpm:license/>\n""" if self.vendor: msg += """ <rpm:vendor>%s</rpm:vendor>\n""" % misc.to_xml(self.vendor) else: msg += """ <rpm:vendor/>\n""" if s... | 8359e3b259bc792accd59189e67a7d3335dcc9b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/8359e3b259bc792accd59189e67a7d3335dcc9b2/packages.py |
msg ="" | msg ="\n" | def _dump_files(self, primary=False): msg ="" if not primary: files = self.returnFileEntries('file') dirs = self.returnFileEntries('dir') ghosts = self.returnFileEntries('ghost') else: files = self.returnFileEntries('file', primary_only=True) dirs = self.returnFileEntries('dir', primary_only=True) ghosts = self.returnF... | 8359e3b259bc792accd59189e67a7d3335dcc9b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/8359e3b259bc792accd59189e67a7d3335dcc9b2/packages.py |
SELECT tid,rpid,name,epoch,version,release,arch,pkgtupid, | SELECT tid,rpid,name,epoch,version,release,arch,pkgtups.pkgtupid, | def search(self, patterns, ignore_case=True): """ Search for history transactions which contain specified packages al. la. "yum list". Returns transaction ids. """ # Search packages ... kind of sucks that it's search not list, pkglist? | eb256430ee0cad7a537960ba1cf9381da95258ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/eb256430ee0cad7a537960ba1cf9381da95258ce/history.py |
def exUserCancel(self): self.logger.critical(_('\n\nExiting on user cancel')) if self.unlock(): return 200 return 1 def exIOError(self, e): if e.errno == 32: self.logger.critical(_('\n\nExiting on Broken Pipe')) else: self.logger.critical(_('\n\n%s') % str(e)) if self.unlock(): return 200 return 1 def exPluginExit(s... | def __init__(self,name,ver,usage): YumBaseCli.__init__(self) self._parser = YumOptionParser(base=self,utils=True,usage=usage) self._usage = usage self._utilName = name self._utilVer = ver self._option_group = OptionGroup(self._parser, "%s options" % self._utilName,"") self._parser.add_option_group(self._option_group) s... | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py | |
def doUtilBuildTransaction(self): try: (result, resultmsgs) = self.buildTransaction() except plugins.PluginYumExit, e: return self.exPluginExit(e) except Errors.YumBaseError, e: result = 1 resultmsgs = [unicode(e)] except KeyboardInterrupt: return self.exUserCancel() except IOError, e: return self.exIOError(e) if re... | def doUtilYumSetup(self): """do a default setup for all the normal/necessary yum components, really just a shorthand for testing""" # FIXME - we need another way to do this, I think. try: self.waitForLock() self._getTs() self._getRpmDB() self._getRepos(doSetup = True) self._getSacks() except Errors.YumBaseError, msg: s... | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py | |
def exUserCancel(): self.logger.critical(_('\n\nExiting on user cancel')) if unlock(): return 200 return 1 def exIOError(e): if e.errno == 32: self.logger.critical(_('\n\nExiting on Broken Pipe')) else: self.logger.critical(_('\n\n%s') % str(e)) if unlock(): return 200 return 1 def exPluginExit(e): '''Called when a p... | def exUserCancel(): self.logger.critical(_('\n\nExiting on user cancel')) if unlock(): return 200 return 1 | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py | |
return exPluginExit(e) | return self.exPluginExit(e) | def unlock(): try: self.closeRpmDB() self.doUnlock() except Errors.LockError, e: return 200 return 0 | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py |
return exFatal(e) | return self.exFatal(e) | def unlock(): try: self.closeRpmDB() self.doUnlock() except Errors.LockError, e: return 200 return 0 | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py |
return exUserCancel() | return self.exUserCancel() | def unlock(): try: self.closeRpmDB() self.doUnlock() except Errors.LockError, e: return 200 return 0 | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py |
return exIOError(e) | return self.exIOError(e,) | def unlock(): try: self.closeRpmDB() self.doUnlock() except Errors.LockError, e: return 200 return 0 | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py |
if unlock(): return 200 | if self.unlock(): return 200 | def unlock(): try: self.closeRpmDB() self.doUnlock() except Errors.LockError, e: return 200 return 0 | 91382336f96fc77a9b60f7508c6b056e98b70555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/91382336f96fc77a9b60f7508c6b056e98b70555/utils.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s'), | self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s') % | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Package is already obsoleted: %s.%s %s:%s-%s'), obsoleted) | self.verbose_logger.log(logginglevels.DEBUG_2, _('Package is already obsoleted: %s.%s %s:%s-%s') % obsoleted) | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s'), | self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s') % | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s'), | self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s') % | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already updated: %s.%s %s:%s-%s'), | self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already updated: %s.%s %s:%s-%s') % | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s'), | self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s') % | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already updated: %s.%s %s:%s-%s'), | self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already updated: %s.%s %s:%s-%s') % | def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t... | dace53a1169f0c66c4771f6b9885c12fa6a6a885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dace53a1169f0c66c4771f6b9885c12fa6a6a885/__init__.py |
def _iter_two_pkgs(self, ignore): | def _iter_two_pkgs(self, ignore_provides): | def _iter_two_pkgs(self, ignore): last = None for pkg in sorted(self.returnPackages()): if pkg.name in ignore: continue if last is None: last = pkg continue yield last, pkg last = pkg | b3a472e892ba5c837f540be72819bd1180022d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b3a472e892ba5c837f540be72819bd1180022d99/rpmsack.py |
if pkg.name in ignore: continue | if pkg.name in ignore_provides: continue if ignore_provides.intersection(set(pkg.provides_names)): continue | def _iter_two_pkgs(self, ignore): last = None for pkg in sorted(self.returnPackages()): if pkg.name in ignore: continue if last is None: last = pkg continue yield last, pkg last = pkg | b3a472e892ba5c837f540be72819bd1180022d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b3a472e892ba5c837f540be72819bd1180022d99/rpmsack.py |
def check_duplicates(self, ignore=[]): """ Checks for any missing dependencies. """ | def check_duplicates(self, ignore_provides=[]): """ Checks for any "duplicate packages" (those with multiple versions installed), we ignore any packages with a provide in the passed provide list (this is how installonlyworks, so we do the same). """ ignore_provides = set(ignore_provides) | def check_duplicates(self, ignore=[]): """ Checks for any missing dependencies. """ | b3a472e892ba5c837f540be72819bd1180022d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b3a472e892ba5c837f540be72819bd1180022d99/rpmsack.py |
for last, pkg in self._iter_two_pkgs(ignore): | for last, pkg in self._iter_two_pkgs(ignore_provides): | def check_duplicates(self, ignore=[]): """ Checks for any missing dependencies. """ | b3a472e892ba5c837f540be72819bd1180022d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b3a472e892ba5c837f540be72819bd1180022d99/rpmsack.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.