summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPhilip Miller <philip.miller@sri.com>2014-10-02 11:03:14 -0400
committerPhilip Miller <philip.miller@sri.com>2014-10-02 11:03:14 -0400
commit6fd76b55e9f368f48dd0c6705015b08cff26407b (patch)
tree64913a037a1386e5ee0b6c38a64a2348c101994a /docs
parentcdb37dc797ebc1057060586f293ccd50e410a1df (diff)
downloadclick-6fd76b55e9f368f48dd0c6705015b08cff26407b.tar.gz
use os.name rather than os.uname()[0] so documentation builds on windows
Diffstat (limited to 'docs')
-rw-r--r--docs/options.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/options.rst b/docs/options.rst
index 7243610..e8f2242 100644
--- a/docs/options.rst
+++ b/docs/options.rst
@@ -118,7 +118,7 @@ Example:
@click.command()
@click.option('--shout/--no-shout', default=False)
def info(shout):
- rv = os.uname()[0]
+ rv = os.name
if shout:
rv = rv.upper() + '!!!!111'
click.echo(rv)
@@ -140,7 +140,7 @@ manually inform Click that something is a flag:
@click.command()
@click.option('--shout', is_flag=True)
def info(shout):
- rv = os.uname()[0]
+ rv = os.name
if shout:
rv = rv.upper() + '!!!!111'
click.echo(rv)
@@ -185,7 +185,7 @@ the default.
default=True)
@click.option('--lower', 'transformation', flag_value='lower')
def info(transformation):
- click.echo(getattr(os.uname()[0], transformation)())
+ click.echo(getattr(os.name, transformation)())
And on the command line: