def restore_version():
 if (ORIGINAL_VERSION_LINE is None):
  return
 with open(u'xonsh/__init__.py', u'r') as f:
  raw = f.read()
 lines = raw.splitlines()
 lines[0] = ORIGINAL_VERSION_LINE
 upd = (u'\n'.join(lines) + u'\n')
 with open(u'xonsh/__init__.py', u'w') as f:
  f.write(upd)

def restore_version ( ) : if ( ORIGINAL_VERSION_LINE is None ) : return with open ( u'xonsh/__init__.py' , u'r' ) as f : raw = f . read ( ) lines = raw . splitlines ( ) lines [ 0 ] = ORIGINAL_VERSION_LINE upd = ( u'\n' . join ( lines ) + u'\n' ) with open ( u'xonsh/__init__.py' , u'w' ) as f : f . write ( upd )
if we touch the version in __init__ .