Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b72cda7

Browse files
author
Tatiana Soukiassian
committed
Auto-correct server class name
If a class has a dash in their name, this will replace it with an underscore.
1 parent ea9ced4 commit b72cda7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fabfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ def numbered(number):
283283
def klass(*class_names):
284284
"""Select a machine class"""
285285
for class_name in class_names:
286+
class_name = class_name.replace("-", "_")
286287
env.hosts.extend(env.roledefs['class-%s' % class_name]())
287288

288289

0 commit comments

Comments
 (0)