blob: c2b6722d63c9e1fd1b2f8156df0892a77834ffa5 [file] [log] [blame]
Wei-Yu Chen49950b92021-11-08 19:19:18 +08001"""
2Copyright 2020 The Magma Authors.
3
4This source code is licensed under the BSD-style license found in the
5LICENSE file in the root directory of this source tree.
6
7Unless required by applicable law or agreed to in writing, software
8distributed under the License is distributed on an "AS IS" BASIS,
9WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10See the License for the specific language governing permissions and
11limitations under the License.
12"""
13
14import os
15
16
17def is_dev_mode() -> bool:
18 """
19 Returns whether the environment is set for dev mode
20 """
21 return os.environ.get('MAGMA_DEV_MODE') == '1'
22
23
24def is_docker_network_mode() -> bool:
25 """
26 Returns whether the environment is set for dev mode
27 """
28 return os.environ.get('DOCKER_NETWORK_MODE') == '1'