This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 823490 - Wrong instructions about os.environ: BookMarks quick start
Wrong instructions about os.environ: BookMarks quick start
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Templates (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-21 07:35 EDT by Attila Nagy
Modified: 2015-05-14 21:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-08 13:59:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Attila Nagy 2012-05-21 07:35:20 EDT
Description of problem: BookMarks quick start app's instruction contains a misleading entry about os.environ variables

It says:

import os.environ           # import if you are using OPENSHIFT_* vars
'ENGINE': 'mysqlite3',
'NAME' = 'bookmarks'        # change it according to your database name, or use os.environ['OPENSHIFT_APP_NAME'].
'USER' = 'admin'            # change it according to your Root Username, or use os.environ['OPENSHIFT_DB_USERNAME'].
'PASSWORD' = 'xxxxxxxxxx'   # change it according to your Root Password, or use os.environ['OPENSHIFT_DB_PASSWORD'].
'HOST' = 'xx.xx.xx.xx'      # change it according to your Connection URL, or use os.environ['OPENSHIFT_DB_HOST'].
'PORT': '3306',             # change it according to your Connection URL, or use os.environ['OPENSHIFT_DB_PORT'].

However the import statement shouldn't work like that. It must be

1) from os import environ - then I can access environment variables as environ['variable_name']

2) import os - then I can access environment variables as os.environ['variable_name']
Comment 1 Attila Nagy 2012-05-21 08:28:40 EDT
One additional mistake:

Master Git URL is also wrong.

It is: git://github.com/lulinqing/openshift-bookmarks.git
It must be: git://github.com/lulinqing/openshift-bookmarks.git
Comment 2 Attila Nagy 2012-05-24 04:03:22 EDT
Sorry... My last comment was wrong.

It must be: git://github.com/openshift/BookMarks-openshift-quickstart.git
Comment 3 Attila Nagy 2012-05-24 04:08:01 EDT
Fixed by commit 7c2e60e8beef314a42572738ee52dfe911e63a80

Note You need to log in before you can comment on or make changes to this bug.