workaround für pyinstaller
This commit is contained in:
parent
97bada2254
commit
6778c5cf73
|
@ -188,15 +188,13 @@ def info(project_id):
|
|||
"""Show project metadata"""
|
||||
projects = refine.Refine(refine.RefineServer()).list_projects()
|
||||
if project_id in projects.keys():
|
||||
projectName = projects[project_id]['name']
|
||||
print('{0:>20}: {1}'.format('id', project_id))
|
||||
print('{0:>20}: {1}'.format('url', 'http://' +
|
||||
refine.REFINE_HOST + ':' +
|
||||
refine.REFINE_PORT +
|
||||
'/project?project=' + project_id))
|
||||
print(u'{0:>20}: {1}'.format(u'name', projectName))
|
||||
for k, v in projects[project_id].items():
|
||||
if v and k != 'name':
|
||||
if v:
|
||||
print(u'{0:>20}: {1}'.format(k, v))
|
||||
project_model = refine.RefineProject(project_id).get_models()
|
||||
columns = [c['name'] for c in project_model['columnModel']['columns']]
|
||||
|
|
|
@ -18,8 +18,14 @@ Script to provide a command line interface to a Refine server.
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
import sys
|
||||
|
||||
from google.refine import __main__, cli, refine
|
||||
|
||||
# workaround für pyinstaller
|
||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
||||
if __name__ == '__main__':
|
||||
__main__.main()
|
||||
|
|
Loading…
Reference in New Issue