mbucc / punch-time-tracking

Automatically exported from code.google.com/p/punch-time-tracking
GNU General Public License v3.0
1 stars 0 forks source link

Resolve variables with more than one $ #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. TODO_DIR is set as: export TODO_DIR="$HOME/todo"
2. TODO_FILE is set as: export TODO_FILE="$TODO_DIR/todo.txt"
3. Call to self.resolve(self.propDict.get('TODO_FILE'))

What is the expected output? What do you see instead?
The result should be '/path/to/home/todo/todo.txt', instead the resolve return 
'$HOME/todo/todo.txt'

What version of the product are you using? On what operating system?
Using version 1.2 on MacOSX

Please provide any additional information below.
To fix this you could put the following if on the if token != -1 block:

>>>
if '$' in value:
   value = self.resolve(value)
>>> 

Original issue reported on code.google.com by joao.du...@gmail.com on 9 Feb 2012 at 3:00

Attachments: