Changeset 79729d5 in flex_extract.git for source/python/install.py


Ignore:
Timestamp:
Mar 8, 2019, 4:07:28 PM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
d727af2
Parents:
82c2959
Message:

switched from python2 to python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/install.py

    r6f951ca r79729d5  
    1 #!/usr/bin/env python
     1#!/usr/bin/env python3
    22# -*- coding: utf-8 -*-
    33#*******************************************************************************
     
    367367                                         in exclude_files
    368368                                      else tarinfo)
    369     except subprocess.CalledProcessError as e:
    370         print('... ERROR CODE:\n ... ' + str(e.returncode))
    371         print('... ERROR MESSAGE:\n ... ' + str(e))
    372 
    373         sys.exit('\n... could not make installation tar ball!')
    374     except OSError as e:
    375         print('... ERROR CODE: ' + str(e.errno))
    376         print('... ERROR MESSAGE:\n \t ' + str(e.strerror))
    377 
    378         sys.exit('\n... error occured while trying to read tar-file ' +
    379                  str(tarball_path))
     369    except tarfile.TarError as e:
     370        sys.exit('\n... error occured while trying to create the tar-file ' +
     371                     str(tarball_path))
    380372
    381373    return
     
    678670                             bufsize=1)
    679671        pout, perr = p.communicate()
    680         print(pout)
     672        print(pout.decode())
    681673        if p.returncode != 0:
    682             print(perr)
     674            print(perr.decode())
    683675            print('Please edit ' + makefile +
    684676                  ' or try another Makefile in the src directory.')
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG