2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/be1853972823/ changeset: be1853972823 user: dan date: 2012-10-17 22:06:20 summary: Use simplejson for python2.5 compatibility in genome index. affected #: 1 file diff -r be7a8d4808676c7519919483f115811a1b77ec9f -r be1853972823836ffd50654900632d6cd7c74acb lib/galaxy/tools/genome_index/index_genome.py --- a/lib/galaxy/tools/genome_index/index_genome.py +++ b/lib/galaxy/tools/genome_index/index_genome.py @@ -7,7 +7,11 @@ """ from __future__ import with_statement -import optparse, sys, os, tempfile, time, subprocess, shlex, json, tarfile, shutil +import optparse, sys, os, tempfile, time, subprocess, shlex, tarfile, shutil + +import pkg_resources +pkg_resources.require("simplejson") +import simplejson class ManagedIndexer(): def __init__( self, output_file, infile, workingdir, rsync_url, tooldata ): @@ -72,7 +76,7 @@ return result def _flush_files( self ): - json.dump( self.locations, self.outfile ) + simplejson.dump( self.locations, self.outfile ) self.outfile.close() self.logfile.close() https://bitbucket.org/galaxy/galaxy-central/changeset/b9c0d2847d68/ changeset: b9c0d2847d68 user: dan date: 2012-10-17 22:06:22 summary: Fix for enumerator in python2.5 in datatype sniffer affected #: 1 file diff -r be1853972823836ffd50654900632d6cd7c74acb -r b9c0d2847d68269f67241f730e5f3ca8bc534ed3 lib/galaxy/datatypes/sniff.py --- a/lib/galaxy/datatypes/sniff.py +++ b/lib/galaxy/datatypes/sniff.py @@ -94,10 +94,14 @@ """ fd, temp_name = tempfile.mkstemp() fp = os.fdopen( fd, "wt" ) - i = 0 - for i, line in enumerate( file( fname, "U" ), 1 ): + i = None + for i, line in enumerate( file( fname, "U" ) ): fp.write( "%s\n" % line.rstrip( "\r\n" ) ) fp.close() + if i is None: + i = 0 + else: + i += 1 if in_place: shutil.move( temp_name, fname ) # Return number of lines in file. @@ -119,12 +123,16 @@ regexp = re.compile( patt ) fd, temp_name = tempfile.mkstemp() fp = os.fdopen( fd, "wt" ) - i = 0 - for i, line in enumerate( file( fname ), 1): + i = None + for i, line in enumerate( file( fname ) ): line = line.rstrip( '\r\n' ) elems = regexp.split( line ) fp.write( "%s\n" % '\t'.join( elems ) ) fp.close() + if i is None: + i = 0 + else: + i += 1 if in_place: shutil.move( temp_name, fname ) # Return number of lines in file. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.