Ravi1G / codejam-commandline

Automatically exported from code.google.com/p/codejam-commandline
Apache License 2.0
0 stars 0 forks source link

Indentation in user_config.py unallowed ? #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. $ ./gcj_init_contest.py 433101
2. $ ./gcj_download_input.py

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "../cl/gcj_download_input.py", line 263, in <module>
    main()
  File "../cl/gcj_download_input.py", line 94, in main
    if not contest_manager.IsInitialized():
  File "/mnt/hgfs/Projects/jam/1a/cl/lib/contest_manager.py", line 238, in IsInitialized
    current_config = data_manager.ReadData()
  File "/mnt/hgfs/Projects/jam/1a/cl/lib/data_manager.py", line 161, in ReadData
    user_data = _ReadDataImpl(user_config_path)
  File "/mnt/hgfs/Projects/jam/1a/cl/lib/data_manager.py", line 62, in _ReadDataImpl
    return eval(file_data, {}, {})
  File "<string>", line 2
    {
    ^
IndentationError: unexpected indent

What version of the product are you using? On what operating system?
Version : codejam-commandline-1.0-beta3.zip
Ubuntu 10.10 32 bits

Please provide any additional information below.
Here is the user_config.py
# -*- coding: utf-8 -*-
    {
    'host'                : 'code.google.com',
    'user'                : '****@gmail.com',
    'password'            : '****',
    'data_directory'      : '../A/',
    'input_name_format'   : '{problem}-{input}-{id}.in',
    'output_name_format'  : '{problem}-{input}-{id}.out',
    'source_names_format' : ['main.cpp'],
    }
Apparently, everything get fixed when I unindent everything like this
# -*- coding: utf-8 -*-
{
'host'                : 'code.google.com',
'user'                : '****@gmail.com',
'password'            : '****',
'data_directory'      : '../A/',
'input_name_format'   : '{problem}-{input}-{id}.in',
'output_name_format'  : '{problem}-{input}-{id}.out',
'source_names_format' : ['main.cpp'],
}
This is why it previously said : 
File "<string>", line 2
    {
    ^
Anyway, I think it would be great to support indentation because many editors 
want to put them.

Thank you so much for this tool !

Original issue reported on code.google.com by benoit.l...@gmail.com on 20 May 2011 at 9:33

GoogleCodeExporter commented 9 years ago
This should be easy to fix.

Original comment by jor...@google.com on 21 May 2011 at 4:41

GoogleCodeExporter commented 9 years ago
Nice that you like the tool, I'm trying to improve it and make it more usable. 
I made a fix for this, the problem is the spaces before the opening brace, the 
fix should be soon in the svn.

Original comment by jor...@google.com on 23 May 2011 at 9:33

GoogleCodeExporter commented 9 years ago
Fix for this was submitted to the svn repository. The zip file has not changed.

Original comment by jor...@google.com on 24 May 2011 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by jor...@google.com on 24 May 2011 at 2:21