[Python-modules-commits] [stepic] 01/01: Convert from git-dpm to patches unapplied format

Scott Kitterman kitterman at moszumanska.debian.org
Sat Jan 6 06:02:04 UTC 2018


This is an automated email from the git hooks/post-receive script.

kitterman pushed a commit to branch debian/master
in repository stepic.

commit 5f51524796085f69655396dc65389bcc17a851da
Author: Scott Kitterman <scott at kitterman.com>
Date:   Sat Jan 6 01:01:30 2018 -0500

    Convert from git-dpm to patches unapplied format
---
 debian/.git-dpm | 11 -----------
 debian/gbp.conf |  2 ++
 setup.py        |  4 ++--
 stepic          |  2 +-
 stepic.py       | 12 ------------
 5 files changed, 5 insertions(+), 26 deletions(-)

diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index fb74ef9..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-caa62ecc671d4fa6707f431cad51f8cc8a5f7069
-caa62ecc671d4fa6707f431cad51f8cc8a5f7069
-c6b02133eafff121e3b290132add17f2565c9f38
-c6b02133eafff121e3b290132add17f2565c9f38
-stepic_0.3.orig.tar.gz
-9aa68c0a90e5a598cc3860f89bb9f9d043f1cc28
-11969
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3879982
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+debian-branch=debian/master
diff --git a/setup.py b/setup.py
index 4618ea8..62ad63c 100755
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,9 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 from distutils.core import setup
 import os
 
-if True:
+if os.environ.get('RELEASE') == '1':
     import stepic
     version = stepic.__version__
 else:
diff --git a/stepic b/stepic
index 38deb48..4c8ac97 100755
--- a/stepic
+++ b/stepic
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # stepic - Python image steganography
 # Copyright (C) 2007 Lenny Domnitser
diff --git a/stepic.py b/stepic.py
index 0f74be9..e8c9078 100644
--- a/stepic.py
+++ b/stepic.py
@@ -40,14 +40,6 @@ __all__ = ('encode_imdata','encode_inplace', 'encode',
            'Steganographer')
 
 
-def _validate_image(image):
-    if image.mode not in ('RGB', 'RGBA', 'CMYK'):
-        raise ValueError('Unsupported pixel format: '
-                         'image must be RGB, RGBA, or CMYK')
-    if image.format == 'JPEG':
-        raise ValueError('JPEG format incompatible with steganography')
-
-
 def encode_imdata(imdata, data):
     '''given a sequence of pixels, returns an iterator of pixels with
     encoded data'''
@@ -78,8 +70,6 @@ def encode_imdata(imdata, data):
 def encode_inplace(image, data):
     '''hides data in an image'''
 
-    _validate_image(image)
-
     w = image.size[0]
     (x, y) = (0, 0)
     for pixel in encode_imdata(image.getdata(), data):
@@ -120,8 +110,6 @@ def decode_imdata(imdata):
 def decode(image):
     '''extracts data from an image'''
 
-    _validate_image(image)
-
     return ''.join(decode_imdata(image.getdata()))
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/stepic.git



More information about the Python-modules-commits mailing list