Skip to contentSkip to conversation

Indentation error for Python module seobject (fix typo)

PATCH In review Guido Trentalancia 3 participants 4 messages Sep 22, 2011 – Sep 23, 2011 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Indentation error for Python module seobject (fix typo)

Hello.

I get an IndentationError from Python when running code which imports seobject.py (line 182).

The following simple patch fixes the problem for current git:

policycoreutils/semanage/seobject.py +1 -1
@@ -182,7 +182,7 @@ class semanageRecords:
 
                if not semanageRecords.transaction and store != "":
                       semanage_select_store(handle, store, SEMANAGE_CON_DIRECT);
-                     semanageRecords.store = store
+                      semanageRecords.store = store
 
                if not semanage_is_managed(handle):
                       semanage_handle_destroy(handle)

Thanks.

Guido

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw

It's fixed in a patch on the queue branch titled:

policycoreutils: semanage: FIXME whitespace changes in seobject

Since I believe that is the only line of that patch which actually fixes a bug, I'll look at applying your patch to head soon.

-Eric

Quoted 21 lines · Guido Trentalancia

Hello.

I get an IndentationError from Python when running code which imports seobject.py (line 182).

The following simple patch fixes the problem for current git:

policycoreutils/semanage/seobject.py      2011-09-22 22:19:19.036640459 +0200 renamed from policycoreutils/semanage/seobject.py       2011-09-17 07:03:41.147162393 +0200 +0 -0
@@ -182,7 +182,7 @@ class semanageRecords:
 

               if not semanageRecords.transaction and store != "":
                      semanage_select_store(handle, store, SEMANAGE_CON_DIRECT);
-                     semanageRecords.store = store
+                      semanageRecords.store = store

               if not semanage_is_managed(handle):
                      semanage_handle_destroy(handle)

Thanks.

Quoted 8 lines

Guido

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 6 lines · Eric Paris

It's fixed in a patch on the queue branch titled:

policycoreutils: semanage: FIXME whitespace changes in seobject

Since I believe that is the only line of that patch which actually fixes a bug, I'll look at applying your patch to head soon.

Yes, please. It breaks execution otherwise.

Quoted 1 line

-Eric

Thanks. Guido

Quoted 23 lines
Quoted 21 lines · Guido Trentalancia

Hello.

I get an IndentationError from Python when running code which imports seobject.py (line 182).

The following simple patch fixes the problem for current git:

policycoreutils/semanage/seobject.py 2011-09-22 22:19:19.036640459 +0200 renamed from policycoreutils/semanage/seobject.py 2011-09-17 07:03:41.147162393 +0200 +1 -1
@@ -182,7 +182,7 @@ class semanageRecords:
 
               if not semanageRecords.transaction and store != "":
                      semanage_select_store(handle, store, SEMANAGE_CON_DIRECT);
-                     semanageRecords.store = store
+                      semanageRecords.store = store
 
               if not semanage_is_managed(handle):
                      semanage_handle_destroy(handle)

Thanks.

Quoted 9 lines
Quoted 8 lines

Guido

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw

Hello,

wasn't the semanage function fixed without the creating a object directory earlier? If i remember but the patch was directed at not adding a new line. I may be wrong.

thanks.

Quoted 60 lines · Guido Trentalancia
Quoted 6 lines · Eric Paris

It's fixed in a patch on the queue branch titled:

policycoreutils: semanage: FIXME whitespace changes in seobject

Since I believe that is the only line of that patch which actually fixes a bug, I'll look at applying your patch to head soon.

Yes, please. It breaks execution otherwise.

Quoted 1 line

-Eric

Thanks. Guido

Quoted 10 lines
Quoted 8 lines · Guido Trentalancia

Hello.

I get an IndentationError from Python when running code which imports seobject.py (line 182).

The following simple patch fixes the problem for current git:

--- selinux-22092011/policycoreutils/semanage/seobject.py

2011-09-17 07:03:41.147162393 +0200
Quoted 1 line
Quoted 1 line

+++

selinux-22092011-fix-indentation-error-in-seobject-python/policycoreutils/semanage/seobject.py

     2011-09-22 22:19:19.036640459 +0200
Quoted 4 lines

policycoreutils/semanage/seobject.py class semanageRecords: · line 184

Quoted 4 lines
policycoreutils/semanage/seobject.py +0 -0
@@ -182,7 +182,7 @@ class semanageRecords:
 
               if not semanageRecords.transaction and store != "":
                      semanage_select_store(handle, store,

SEMANAGE_CON_DIRECT);

Quoted 6 lines
Quoted 6 lines
policycoreutils/semanage/seobject.py +1 -1
-                     semanageRecords.store = store
+                      semanageRecords.store = store
 
               if not semanage_is_managed(handle):
                      semanage_handle_destroy(handle)
Quoted 7 lines
Quoted 7 lines

Thanks.

Guido

--
This message was distributed to subscribers of the selinux mailing

list.

Quoted 1 line
Quoted 1 line

If you no longer wish to subscribe, send mail to

[email protected] with

Quoted 3 lines
Quoted 2 lines

the words "unsubscribe selinux" without quotes as the message.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] the words "unsubscribe selinux" without quotes as the message.