Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- johnson@boromir:~/www/sandbox/trunklayers/tools (01:58PM)
- $ svn diff mergejs.py
- Index: mergejs.py
- ===================================================================
- --- mergejs.py (revision 7075)
- +++ mergejs.py (working copy)
- @@ -117,9 +117,9 @@
- """
- Parses the content of the named file and stores the values.
- """
- - lines = [line.strip() # Assumes end-of-line character is present
- + lines = [re.sub(" #.*?$", "", line).strip() # Assumes end-of-line character is present
- for line in open(filename)
- - if line.strip()] # Skip blank lines
- + if line.strip() and not line.strip().startswith("#")] # Skip blank lines and comments
- self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")]
Add Comment
Please, Sign In to add comment