Skip to content

Commit

Permalink
Be flexible with whitespace when parsing DB info
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jan 7, 2016
1 parent b7cb75e commit 4e9e508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swb/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_db_info(wordpress_path):
db_info = {}

# Find all PHP constant definitions pertaining to database
matches = re.finditer('define\(\'DB_([A-Z]+)\', \'(.*?)\'\)',
matches = re.finditer('define\(\s*\'DB_([A-Z]+)\',\s*\'(.*?)\'\s*\)',
wp_config_contents)
for match in matches:
key = match.group(1).lower()
Expand Down

0 comments on commit 4e9e508

Please sign in to comment.