~coreygoldberg/uci-engine/subunit-results

« back to all changes in this revision

Viewing changes to cupstream2distro/tests/mocks/offline/dput

Merge trunk, resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# -*- coding: utf-8 -*-
 
3
# Copyright: (C) 2013 Canonical
 
4
#
 
5
# Authors:
 
6
#  Didier Roche
 
7
#
 
8
# This program is free software; you can redistribute it and/or modify it under
 
9
# the terms of the GNU General Public License as published by the Free Software
 
10
# Foundation; version 3.
 
11
#
 
12
# This program is distributed in the hope that it will be useful, but WITHOUT
 
13
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
14
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
15
# details.
 
16
#
 
17
# You should have received a copy of the GNU General Public License along with
 
18
# this program; if not, write to the Free Software Foundation, Inc.,
 
19
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
20
 
 
21
import os
 
22
import sys
 
23
 
 
24
 
 
25
if __name__ == '__main__':
 
26
 
 
27
    if os.environ.get("MOCK_ERROR_MODE") == "1":
 
28
        sys.exit(1)
 
29
 
 
30
    command = " ".join(sys.argv[1:])
 
31
    if command == "ppa:didrocks/foo foo_83.09.13-0ubuntu1_source.changes":
 
32
        sys.exit(0)
 
33
 
 
34
 
 
35
    # unhandled case
 
36
    sys.exit(1)