Changeset 246:131fdcdd15b3
- Timestamp:
- 2007-08-12 14:36:52
(1 year ago)
- Author:
- Stefan Schwarzer <sschwarzer@sschwarzer.net>
- branch:
- default
- Message:
Allow to set ignore patterns from environment variable `WSB_IGNORE`.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r245 |
r246 |
|
| 283 | 283 | |
|---|
| 284 | 284 | def main(): |
|---|
| | 285 | config.set_from_environment() |
|---|
| 285 | 286 | config.set_from_args() |
|---|
| 286 | 287 | startup_info() |
|---|
| r166 |
r246 |
|
| 150 | 150 | globals()[name] = getattr(options, name) |
|---|
| 151 | 151 | |
|---|
| | 152 | |
|---|
| | 153 | def set_from_environment(): |
|---|
| | 154 | """ |
|---|
| | 155 | Inspect the environment to set some configuration parameters. |
|---|
| | 156 | |
|---|
| | 157 | Currently, only the ignore patterns are considered, via the |
|---|
| | 158 | environment variable `WSB_IGNORE`. Its value is a comma- |
|---|
| | 159 | separated string of patterns. |
|---|
| | 160 | """ |
|---|
| | 161 | global ignore_patterns |
|---|
| | 162 | environ = os.environ |
|---|
| | 163 | patterns = environ.get('WSB_IGNORE', "") |
|---|
| | 164 | for pattern in patterns.split(","): |
|---|
| | 165 | ignore_patterns.append(pattern) |
|---|
| | 166 | |
|---|